!function(){var t,i={24782:function(t,i){"use strict";i.byteLength=function(t){var i=u(t),e=i[0],n=i[1];return 3*(e+n)/4-n},i.toByteArray=function(t){var i,e,s=u(t),o=s[0],a=s[1],h=new r(function(t,i,e){return 3*(i+e)/4-e}(0,o,a)),f=0,c=a>0?o-4:o;for(e=0;e>16&255,h[f++]=i>>8&255,h[f++]=255&i;2===a&&(i=n[t.charCodeAt(e)]<<2|n[t.charCodeAt(e+1)]>>4,h[f++]=255&i);1===a&&(i=n[t.charCodeAt(e)]<<10|n[t.charCodeAt(e+1)]<<4|n[t.charCodeAt(e+2)]>>2,h[f++]=i>>8&255,h[f++]=255&i);return h},i.fromByteArray=function(t){for(var i,n=t.length,r=n%3,s=[],o=16383,a=0,u=n-r;au?u:a+o));1===r?(i=t[n-1],s.push(e[i>>2]+e[i<<4&63]+"==")):2===r&&(i=(t[n-2]<<8)+t[n-1],s.push(e[i>>10]+e[i>>4&63]+e[i<<2&63]+"="));return s.join("")};for(var e=[],n=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var e=t.indexOf("=");return-1===e&&(e=i),[e,e===i?0:4-e%4]}function h(t,i,n){for(var r,s,o=[],a=i;a>18&63]+e[s>>12&63]+e[s>>6&63]+e[63&s]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},30816:function(t,i,e){"use strict"; /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */var n=e(24782),r=e(78898),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;i.Buffer=u,i.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},i.INSPECT_MAX_BYTES=50;var o=2147483647;function a(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=new Uint8Array(t);return Object.setPrototypeOf(i,u.prototype),i}function u(t,i,e){if("number"==typeof t){if("string"==typeof i)throw new TypeError('The "string" argument must be of type string. Received type number');return c(t)}return h(t,i,e)}function h(t,i,e){if("string"==typeof t)return function(t,i){"string"==typeof i&&""!==i||(i="utf8");if(!u.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var e=0|p(t,i),n=a(e),r=n.write(t,i);r!==e&&(n=n.slice(0,r));return n}(t,i);if(ArrayBuffer.isView(t))return function(t){if(G(t,Uint8Array)){var i=new Uint8Array(t);return d(i.buffer,i.byteOffset,i.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(G(t,ArrayBuffer)||t&&G(t.buffer,ArrayBuffer))return d(t,i,e);if("undefined"!=typeof SharedArrayBuffer&&(G(t,SharedArrayBuffer)||t&&G(t.buffer,SharedArrayBuffer)))return d(t,i,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,i,e);var r=function(t){if(u.isBuffer(t)){var i=0|v(t.length),e=a(i);return 0===e.length||t.copy(e,0,0,i),e}if(void 0!==t.length)return"number"!=typeof t.length||B(t.length)?a(0):l(t);if("Buffer"===t.type&&Array.isArray(t.data))return l(t.data)}(t);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),i,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function c(t){return f(t),a(t<0?0:0|v(t))}function l(t){for(var i=t.length<0?0:0|v(t.length),e=a(i),n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,i){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||G(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var e=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===e)return 0;for(var r=!1;;)switch(i){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return z(t).length;default:if(r)return n?-1:F(t).length;i=(""+i).toLowerCase(),r=!0}}function m(t,i,e){var n=!1;if((void 0===i||i<0)&&(i=0),i>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if((e>>>=0)<=(i>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,i,e);case"utf8":case"utf-8":return T(this,i,e);case"ascii":return A(this,i,e);case"latin1":case"binary":return O(this,i,e);case"base64":return E(this,i,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,i,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function y(t,i,e){var n=t[i];t[i]=t[e],t[e]=n}function g(t,i,e,n,r){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),B(e=+e)&&(e=r?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(r)return-1;e=t.length-1}else if(e<0){if(!r)return-1;e=0}if("string"==typeof i&&(i=u.from(i,n)),u.isBuffer(i))return 0===i.length?-1:b(t,i,e,n,r);if("number"==typeof i)return i&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,i,e):Uint8Array.prototype.lastIndexOf.call(t,i,e):b(t,[i],e,n,r);throw new TypeError("val must be string, number or Buffer")}function b(t,i,e,n,r){var s,o=1,a=t.length,u=i.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||i.length<2)return-1;o=2,a/=2,u/=2,e/=2}function h(t,i){return 1===o?t[i]:t.readUInt16BE(i*o)}if(r){var f=-1;for(s=e;sa&&(e=a-u),s=e;s>=0;s--){for(var c=!0,l=0;lr&&(n=r):n=r;var s=i.length;n>s/2&&(n=s/2);for(var o=0;o>8,r=e%256,s.push(r),s.push(n);return s}(i,t.length-e),t,e,n)}function E(t,i,e){return 0===i&&e===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(i,e))}function T(t,i,e){e=Math.min(t.length,e);for(var n=[],r=i;r239?4:h>223?3:h>191?2:1;if(r+c<=e)switch(c){case 1:h<128&&(f=h);break;case 2:128==(192&(s=t[r+1]))&&(u=(31&h)<<6|63&s)>127&&(f=u);break;case 3:s=t[r+1],o=t[r+2],128==(192&s)&&128==(192&o)&&(u=(15&h)<<12|(63&s)<<6|63&o)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:s=t[r+1],o=t[r+2],a=t[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&(u=(15&h)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,c=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),r+=c}return function(t){var i=t.length;if(i<=_)return String.fromCharCode.apply(String,t);var e="",n=0;for(;nn.length?u.from(s).copy(n,r):Uint8Array.prototype.set.call(n,s,r);else{if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,r)}r+=s.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;ie&&(t+=" ... "),""},s&&(u.prototype[s]=u.prototype.inspect),u.prototype.compare=function(t,i,e,n,r){if(G(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===i&&(i=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===r&&(r=this.length),i<0||e>t.length||n<0||r>this.length)throw new RangeError("out of range index");if(n>=r&&i>=e)return 0;if(n>=r)return-1;if(i>=e)return 1;if(this===t)return 0;for(var s=(r>>>=0)-(n>>>=0),o=(e>>>=0)-(i>>>=0),a=Math.min(s,o),h=this.slice(n,r),f=t.slice(i,e),c=0;c>>=0,isFinite(e)?(e>>>=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var r=this.length-i;if((void 0===e||e>r)&&(e=r),t.length>0&&(e<0||i<0)||i>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return w(this,t,i,e);case"utf8":case"utf-8":return M(this,t,i,e);case"ascii":case"latin1":case"binary":return x(this,t,i,e);case"base64":return k(this,t,i,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,i,e);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function A(t,i,e){var n="";e=Math.min(t.length,e);for(var r=i;rn)&&(e=n);for(var r="",s=i;se)throw new RangeError("Trying to access beyond buffer length")}function R(t,i,e,n,r,s){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(i>r||it.length)throw new RangeError("Index out of range")}function P(t,i,e,n,r,s){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function N(t,i,e,n,s){return i=+i,e>>>=0,s||P(t,0,e,4),r.write(t,i,e,n,23,4),e+4}function D(t,i,e,n,s){return i=+i,e>>>=0,s||P(t,0,e,8),r.write(t,i,e,n,52,8),e+8}u.prototype.slice=function(t,i){var e=this.length;(t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(i=void 0===i?e:~~i)<0?(i+=e)<0&&(i=0):i>e&&(i=e),i>>=0,i>>>=0,e||I(t,i,this.length);for(var n=this[t],r=1,s=0;++s>>=0,i>>>=0,e||I(t,i,this.length);for(var n=this[t+--i],r=1;i>0&&(r*=256);)n+=this[t+--i]*r;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,i){return t>>>=0,i||I(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,i){return t>>>=0,i||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,i){return t>>>=0,i||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,i){return t>>>=0,i||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,i){return t>>>=0,i||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,i,e){t>>>=0,i>>>=0,e||I(t,i,this.length);for(var n=this[t],r=1,s=0;++s=(r*=128)&&(n-=Math.pow(2,8*i)),n},u.prototype.readIntBE=function(t,i,e){t>>>=0,i>>>=0,e||I(t,i,this.length);for(var n=i,r=1,s=this[t+--n];n>0&&(r*=256);)s+=this[t+--n]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*i)),s},u.prototype.readInt8=function(t,i){return t>>>=0,i||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,i){t>>>=0,i||I(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},u.prototype.readInt16BE=function(t,i){t>>>=0,i||I(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},u.prototype.readInt32LE=function(t,i){return t>>>=0,i||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,i){return t>>>=0,i||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,i){return t>>>=0,i||I(t,4,this.length),r.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,i){return t>>>=0,i||I(t,4,this.length),r.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,i){return t>>>=0,i||I(t,8,this.length),r.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,i){return t>>>=0,i||I(t,8,this.length),r.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,i,e,n){(t=+t,i>>>=0,e>>>=0,n)||R(this,t,i,e,Math.pow(2,8*e)-1,0);var r=1,s=0;for(this[i]=255&t;++s>>=0,e>>>=0,n)||R(this,t,i,e,Math.pow(2,8*e)-1,0);var r=e-1,s=1;for(this[i+r]=255&t;--r>=0&&(s*=256);)this[i+r]=t/s&255;return i+e},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,1,255,0),this[i]=255&t,i+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,2,65535,0),this[i]=255&t,this[i+1]=t>>>8,i+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,2,65535,0),this[i]=t>>>8,this[i+1]=255&t,i+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,4,4294967295,0),this[i+3]=t>>>24,this[i+2]=t>>>16,this[i+1]=t>>>8,this[i]=255&t,i+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,4,4294967295,0),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},u.prototype.writeIntLE=function(t,i,e,n){if(t=+t,i>>>=0,!n){var r=Math.pow(2,8*e-1);R(this,t,i,e,r-1,-r)}var s=0,o=1,a=0;for(this[i]=255&t;++s>0)-a&255;return i+e},u.prototype.writeIntBE=function(t,i,e,n){if(t=+t,i>>>=0,!n){var r=Math.pow(2,8*e-1);R(this,t,i,e,r-1,-r)}var s=e-1,o=1,a=0;for(this[i+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[i+s+1]&&(a=1),this[i+s]=(t/o>>0)-a&255;return i+e},u.prototype.writeInt8=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,1,127,-128),t<0&&(t=255+t+1),this[i]=255&t,i+1},u.prototype.writeInt16LE=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,2,32767,-32768),this[i]=255&t,this[i+1]=t>>>8,i+2},u.prototype.writeInt16BE=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,2,32767,-32768),this[i]=t>>>8,this[i+1]=255&t,i+2},u.prototype.writeInt32LE=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,4,2147483647,-2147483648),this[i]=255&t,this[i+1]=t>>>8,this[i+2]=t>>>16,this[i+3]=t>>>24,i+4},u.prototype.writeInt32BE=function(t,i,e){return t=+t,i>>>=0,e||R(this,t,i,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[i]=t>>>24,this[i+1]=t>>>16,this[i+2]=t>>>8,this[i+3]=255&t,i+4},u.prototype.writeFloatLE=function(t,i,e){return N(this,t,i,!0,e)},u.prototype.writeFloatBE=function(t,i,e){return N(this,t,i,!1,e)},u.prototype.writeDoubleLE=function(t,i,e){return D(this,t,i,!0,e)},u.prototype.writeDoubleBE=function(t,i,e){return D(this,t,i,!1,e)},u.prototype.copy=function(t,i,e,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(e||(e=0),n||0===n||(n=this.length),i>=t.length&&(i=t.length),i||(i=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-i>>=0,e=void 0===e?this.length:e>>>0,t||(t=0),"number"==typeof t)for(s=i;s55295&&e<57344){if(!r){if(e>56319){(i-=3)>-1&&s.push(239,191,189);continue}if(o+1===n){(i-=3)>-1&&s.push(239,191,189);continue}r=e;continue}if(e<56320){(i-=3)>-1&&s.push(239,191,189),r=e;continue}e=65536+(r-55296<<10|e-56320)}else r&&(i-=3)>-1&&s.push(239,191,189);if(r=null,e<128){if((i-=1)<0)break;s.push(e)}else if(e<2048){if((i-=2)<0)break;s.push(e>>6|192,63&e|128)}else if(e<65536){if((i-=3)<0)break;s.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((i-=4)<0)break;s.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return s}function z(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function U(t,i,e,n){for(var r=0;r=i.length||r>=t.length);++r)i[r+e]=t[r];return r}function G(t,i){return t instanceof i||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===i.name}function B(t){return t!=t}var q=function(){for(var t="0123456789abcdef",i=new Array(256),e=0;e<16;++e)for(var n=16*e,r=0;r<16;++r)i[n+r]=t[e]+t[r];return i}()},96292:function(t,i,e){i.formatArgs=function(i){if(i[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+i[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;const e="color: "+this.color;i.splice(1,0,e,"color: inherit");let n=0,r=0;i[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(n++,"%c"===t&&(r=n))})),i.splice(r,0,e)},i.save=function(t){try{t?i.storage.setItem("debug",t):i.storage.removeItem("debug")}catch(t){}},i.load=function(){let t;try{t=i.storage.getItem("debug")}catch(t){}!t&&"undefined"!=typeof process&&"env"in process&&(t=process.env.DEBUG);return t},i.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},i.storage=function(){try{return localStorage}catch(t){}}(),i.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],i.log=console.debug||console.log||(()=>{}),t.exports=e(29374)(i);const{formatters:n}=t.exports;n.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}},29374:function(t,i,e){t.exports=function(t){function i(t){let e,r=null;function s(...t){if(!s.enabled)return;const n=s,r=Number(new Date),o=r-(e||r);n.diff=o,n.prev=e,n.curr=r,e=r,t[0]=i.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");let a=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,((e,r)=>{if("%%"===e)return"%";a++;const s=i.formatters[r];if("function"==typeof s){const i=t[a];e=s.call(n,i),t.splice(a,1),a--}return e})),i.formatArgs.call(n,t);(n.log||i.log).apply(n,t)}return s.namespace=t,s.useColors=i.useColors(),s.color=i.selectColor(t),s.extend=n,s.destroy=i.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?i.enabled(t):r,set:t=>{r=t}}),"function"==typeof i.init&&i.init(s),s}function n(t,e){const n=i(this.namespace+(void 0===e?":":e)+t);return n.log=this.log,n}function r(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return i.debug=i,i.default=i,i.coerce=function(t){if(t instanceof Error)return t.stack||t.message;return t},i.disable=function(){const t=[...i.names.map(r),...i.skips.map(r).map((t=>"-"+t))].join(",");return i.enable(""),t},i.enable=function(t){let e;i.save(t),i.names=[],i.skips=[];const n=("string"==typeof t?t:"").split(/[\s,]+/),r=n.length;for(e=0;e{i[e]=t[e]})),i.names=[],i.skips=[],i.formatters={},i.selectColor=function(t){let e=0;for(let i=0;i0&&o.length>r&&!o.warned){o.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(i)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=i,f.count=o.length,h=f,console&&console.warn&&console.warn(h)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(t,i,e){var n={fired:!1,wrapFn:void 0,target:t,type:i,listener:e},r=f.bind(n);return r.listener=e,n.wrapFn=r,r}function l(t,i,e){var n=t._events;if(void 0===n)return[];var r=n[i];return void 0===r?[]:"function"==typeof r?e?[r.listener||r]:[r]:e?function(t){for(var i=new Array(t.length),e=0;e0&&(o=i[0]),o instanceof Error)throw o;var a=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var u=s[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,i);else{var h=u.length,f=v(u,h);for(e=0;e=0;s--)if(e[s]===i||e[s].listener===i){o=e[s].listener,r=s;break}if(r<0)return this;0===r?e.shift():function(t,i){for(;i+1=0;n--)this.removeListener(t,i[n]);return this},s.prototype.listeners=function(t){return l(this,t,!0)},s.prototype.rawListeners=function(t){return l(this,t,!1)},s.listenerCount=function(t,i){return"function"==typeof t.listenerCount?t.listenerCount(i):d.call(t,i)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]}},78898:function(t,i){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ i.read=function(t,i,e,n,r){var s,o,a=8*r-n-1,u=(1<>1,f=-7,c=e?r-1:0,l=e?-1:1,d=t[i+c];for(c+=l,s=d&(1<<-f)-1,d>>=-f,f+=a;f>0;s=256*s+t[i+c],c+=l,f-=8);for(o=s&(1<<-f)-1,s>>=-f,f+=n;f>0;o=256*o+t[i+c],c+=l,f-=8);if(0===s)s=1-h;else{if(s===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),s-=h}return(d?-1:1)*o*Math.pow(2,s-n)},i.write=function(t,i,e,n,r,s){var o,a,u,h=8*s-r-1,f=(1<>1,l=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,v=n?1:-1,p=i<0||0===i&&1/i<0?1:0;for(i=Math.abs(i),isNaN(i)||i===1/0?(a=isNaN(i)?1:0,o=f):(o=Math.floor(Math.log(i)/Math.LN2),i*(u=Math.pow(2,-o))<1&&(o--,u*=2),(i+=o+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(o++,u/=2),o+c>=f?(a=0,o=f):o+c>=1?(a=(i*u-1)*Math.pow(2,r),o+=c):(a=i*Math.pow(2,c-1)*Math.pow(2,r),o=0));r>=8;t[e+d]=255&a,d+=v,a/=256,r-=8);for(o=o<0;t[e+d]=255&o,d+=v,o/=256,h-=8);t[e+d-v]|=128*p}},70087:function(t){"function"==typeof Object.create?t.exports=function(t,i){i&&(t.t=i,t.prototype=Object.create(i.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,i){if(i){t.t=i;var e=function(){};e.prototype=i.prototype,t.prototype=new e,t.prototype.constructor=t}}},78828:function(t){"use strict";t.exports=t=>!!t&&("symbol"==typeof Symbol.observable&&"function"==typeof t[Symbol.observable]?t===t[Symbol.observable]():"function"==typeof t["@@observable"]&&t===t["@@observable"]())},5100:function(t,i){var e,n,r,s,o,a,u,h,f,c,l,d,v; /* Copyright 2015-2021 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */n={defaultNoDataValue:-34027999387901484e22,decode:function(t,i){var e=(i=i||{}).encodedMaskData||null===i.encodedMaskData,u=a(t,i.inputOffset||0,e),h=null!==i.noDataValue?i.noDataValue:n.defaultNoDataValue,f=r(u,i.pixelType||Float32Array,i.encodedMaskData,h,i.returnMask),c={width:u.width,height:u.height,pixelData:f.resultPixels,minValue:f.minValue,maxValue:u.pixels.maxValue,noDataValue:h};return f.resultMask&&(c.maskData=f.resultMask),i.returnEncodedMask&&u.mask&&(c.encodedMaskData=u.mask.bitset?u.mask.bitset:null),i.returnFileInfo&&(c.fileInfo=s(u),i.computeUsedBitDepths&&(c.fileInfo.bitDepths=o(u))),c}},r=function(t,i,e,n,r){var s,o,a,h=0,f=t.pixels.numBlocksX,c=t.pixels.numBlocksY,l=Math.floor(t.width/f),d=Math.floor(t.height/c),v=2*t.maxZError,p=Number.MAX_VALUE;e=e||(t.mask?t.mask.bitset:null),o=new i(t.width*t.height),r&&e&&(a=new Uint8Array(t.width*t.height));for(var m,y,g=new Float32Array(l*d),b=0;b<=c;b++){var w=b!==c?d:t.height%c;if(0!==w)for(var M=0;M<=f;M++){var x=M!==f?l:t.width%f;if(0!==x){var k,S,E,T,_=b*t.width*d+M*l,A=t.width-x,O=t.pixels.blocks[h];if(O.encoding<2?(0===O.encoding?k=O.rawData:(u(O.stuffedData,O.bitsPerPixel,O.numValidPixels,O.offset,v,g,t.pixels.maxValue),k=g),S=0):E=2===O.encoding?0:O.offset,e)for(y=0;y>3],T<<=7&_),m=0;m>3]),128&T?(a&&(a[_]=1),p=p>(s=O.encoding<2?k[S++]:E)?s:p,o[_++]=s):(a&&(a[_]=0),o[_++]=n),T<<=1;_+=A}else if(O.encoding<2)for(y=0;y(s=k[S++])?s:p,o[_++]=s;_+=A}else for(p=p>E?E:p,y=0;y0){var o=new Uint8Array(Math.ceil(n.width*n.height/8)),a=(s=new DataView(t,i,n.mask.numBytes)).getInt16(0,!0),u=2,h=0;do{if(a>0)for(;a--;)o[h++]=s.getUint8(u++);else{var f=s.getUint8(u++);for(a=-a;a--;)o[h++]=f}a=s.getInt16(u,!0),u+=2}while(u0?1:0),v=l+(n.height%l>0?1:0);n.pixels.blocks=new Array(d*v);for(var p=0,m=0;m3)throw"Invalid block encoding ("+w.encoding+")";if(2!==w.encoding){if(0!==M&&2!==M){if(M>>=6,w.offsetType=M,2===M)w.offset=s.getInt8(1),g++;else if(1===M)w.offset=s.getInt16(1,!0),g+=2;else{if(0!==M)throw"Invalid block offset type";w.offset=s.getFloat32(1,!0),g+=4}if(1===w.encoding)if(M=s.getUint8(g),g++,w.bitsPerPixel=63&M,M>>=6,w.numValidPixelsType=M,2===M)w.numValidPixels=s.getUint8(g),g++;else if(1===M)w.numValidPixels=s.getUint16(g,!0),g+=2;else{if(0!==M)throw"Invalid valid pixel count type";w.numValidPixels=s.getUint32(g,!0),g+=4}}var x;if(i+=g,3!==w.encoding)if(0===w.encoding){var k=(n.pixels.numBytes-1)/4;if(k!==Math.floor(k))throw"uncompressed block has invalid length";x=new ArrayBuffer(4*k),new Uint8Array(x).set(new Uint8Array(t,i,4*k));var S=new Float32Array(x);w.rawData=S,i+=4*k}else if(1===w.encoding){var E=Math.ceil(w.numValidPixels*w.bitsPerPixel/8),T=Math.ceil(E/4);x=new ArrayBuffer(4*T),new Uint8Array(x).set(new Uint8Array(t,i,E)),w.stuffedData=new Uint32Array(x),i+=E}}else i++}return n.eofOffset=i,n},u=function(t,i,e,n,r,s,o){var a,u,h,f=(1<=i)u=h>>>l-i&f,l-=i;else{var p=i-l;u=(h&f)<>>(l=32-p)}s[a]=u=e?(h=f>>>p-e&d,p-=e):(h=(f&d)<<(c=e-p)&d,h+=(f=t[v++])>>>(p=32-c)),i[u]=r[h];else for(l=Math.ceil((a-s)/o),u=0;u=e?(h=f>>>p-e&d,p-=e):(h=(f&d)<<(c=e-p)&d,h+=(f=t[v++])>>>(p=32-c)),i[u]=h=i?(l=o>>>c-i&a,c-=i):(l=(o&a)<<(f=i-c)&a,l+=(o=t[u++])>>>(c=32-f)),d[h]=l=e?(h=f>>>p&l,v-=e,p+=e):(h=f>>>p&l,v=32-(c=e-v),h|=((f=t[d++])&(1<=e?(h=f>>>p&l,v-=e,p+=e):(h=f>>>p&l,v=32-(c=e-v),h|=((f=t[d++])&(1<=i?(l=o>>>d&a,c-=i,d+=i):(l=o>>>d&a,c=32-(f=i-c),l|=((o=t[u++])&(1<=e?(s=o>>>f-e&u,f-=e):(s=(o&u)<<(a=e-f)&u,s+=(o=t[h++])>>>(f=32-a)),i[r]=s;return i},s=function(t,i,e,n){var r,s,o,a,u=(1<=e?(s=o>>>c&u,f-=e,c+=e):(s=o>>>c&u,f=32-(a=e-f),s|=((o=t[h++])&(1<=359?359:r;r-=o;do{i+=t[s++]<<8,e+=i+=t[s++]}while(--o);i=(65535&i)+(i>>>16),e=(65535&e)+(e>>>16)}return 1&n&&(e+=i+=t[s]<<8),((e=(65535&e)+(e>>>16))<<16|(i=(65535&i)+(i>>>16)))>>>0},readHeaderInfo:function(t,i){var e=i.ptr,n=new Uint8Array(t,e,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,n),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;e+=6;var s,o=new DataView(t,e,8),a=o.getInt32(0,!0);if(r.fileVersion=a,e+=4,a>=3&&(r.checksum=o.getUint32(4,!0),e+=4),o=new DataView(t,e,12),r.height=o.getUint32(0,!0),r.width=o.getUint32(4,!0),e+=8,a>=4?(r.numDims=o.getUint32(8,!0),e+=4):r.numDims=1,o=new DataView(t,e,40),r.numValidPixel=o.getUint32(0,!0),r.microBlockSize=o.getInt32(4,!0),r.blobSize=o.getInt32(8,!0),r.imageType=o.getInt32(12,!0),r.maxZError=o.getFloat64(16,!0),r.zMin=o.getFloat64(24,!0),r.zMax=o.getFloat64(32,!0),e+=40,i.headerInfo=r,i.ptr=e,a>=3&&(s=a>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(t,e-s,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(t,i){var e=i.headerInfo,n=this.getDataTypeArray(e.imageType),r=e.numDims*this.getDataTypeSize(e.imageType),s=this.readSubArray(t,i.ptr,n,r),o=this.readSubArray(t,i.ptr+r,n,r);i.ptr+=2*r;var a,u=!0;for(a=0;a0){e=new Uint8Array(Math.ceil(o/8));var f=(u=new DataView(t,r,h.numBytes)).getInt16(0,!0),c=2,l=0,d=0;do{if(f>0)for(;f--;)e[l++]=u.getUint8(c++);else for(d=u.getUint8(c++),f=-f;f--;)e[l++]=d;f=u.getInt16(c,!0),c+=2}while(c>3],v<<=7&p):v=e[p>>3],128&v&&(n[p]=1);i.pixels.resultMask=n,h.bitset=e,r+=h.numBytes}return i.ptr=r,i.mask=h,!0},readDataOneSweep:function(t,i,e,n){var r,s=i.ptr,a=i.headerInfo,u=a.numDims,h=a.width*a.height,f=a.imageType,c=a.numValidPixel*o.getDataTypeSize(f)*u,l=i.pixels.resultMask;if(e===Uint8Array)r=new Uint8Array(t,s,c);else{var d=new ArrayBuffer(c);new Uint8Array(d).set(new Uint8Array(t,s,c)),r=new e(d)}if(r.length===h*u)i.pixels.resultPixels=n?o.swapDimensionOrder(r,h,u,e,!0):r;else{i.pixels.resultPixels=new e(h*u);var v=0,p=0,m=0,y=0;if(u>1){if(n){for(p=0;p=u)return!1;var h=new Uint32Array(u-s);o.decodeBits(t,i,h);var f,c,l,d,v=[];for(f=s;f0&&(v[c].second=g<>>32-d,32-w>=d?32===(w+=d)&&(w=0,g=b[++M]):(w+=d-32,g=b[++M],v[c].second|=g>>>32-w));var x=0,k=0,S=new a;for(f=0;f=e?e:x;var E,T,_,A,O,j=[];for(f=s;f0)if(E=[d,c],d<=k)for(T=v[c].second<=0;A--)T>>>A&1?(O.right||(O.right=new a),O=O.right):(O.left||(O.left=new a),O=O.left),0!==A||O.val||(O.val=E[1]);return{decodeLut:j,numBitsLUTQick:k,numBitsLUT:x,tree:S,stuffedData:b,srcPtr:M,bitPos:w}},readHuffman:function(t,i,e,n){var r,s,a,u,h,f,c,l,d,v=i.headerInfo.numDims,p=i.headerInfo.height,m=i.headerInfo.width,y=m*p,g=this.readHuffmanTree(t,i),b=g.decodeLut,w=g.tree,M=g.stuffedData,x=g.srcPtr,k=g.bitPos,S=g.numBitsLUTQick,E=g.numBitsLUT,T=0===i.headerInfo.imageType?128:0,_=i.pixels.resultMask,A=0;k>0&&(x++,k=0);var O,j=M[x],C=1===i.encodeMode,I=new e(y*v),R=I;if(v<2||C){for(O=0;O1&&(R=new e(I.buffer,y*O,y),A=0),i.headerInfo.numValidPixel===m*p)for(l=0,f=0;f>>32-S,32-k>>64-k-S),b[h])s=b[h][1],k+=b[h][0];else for(h=u=j<>>32-E,32-k>>64-k-E),r=w,d=0;d>>E-d-1&1?r.right:r.left).left&&!r.right){s=r.val,k=k+d+1;break}k>=32&&(k-=32,j=M[++x]),a=s-T,C?(a+=c>0?A:f>0?R[l-m]:A,a&=255,R[l]=a,A=a):R[l]=a}else for(l=0,f=0;f>>32-S,32-k>>64-k-S),b[h])s=b[h][1],k+=b[h][0];else for(h=u=j<>>32-E,32-k>>64-k-E),r=w,d=0;d>>E-d-1&1?r.right:r.left).left&&!r.right){s=r.val,k=k+d+1;break}k>=32&&(k-=32,j=M[++x]),a=s-T,C?(c>0&&_[l-1]?a+=A:f>0&&_[l-m]?a+=R[l-m]:a+=A,a&=255,R[l]=a,A=a):R[l]=a}}else for(l=0,f=0;f>>32-S,32-k>>64-k-S),b[h])s=b[h][1],k+=b[h][0];else for(h=u=j<>>32-E,32-k>>64-k-E),r=w,d=0;d>>E-d-1&1?r.right:r.left).left&&!r.right){s=r.val,k=k+d+1;break}k>=32&&(k-=32,j=M[++x]),a=s-T,R[l]=a}i.ptr=i.ptr+4*(x+1)+(k>0?4:0),i.pixels.resultPixels=I,v>1&&!n&&(i.pixels.resultPixels=o.swapDimensionOrder(I,y,v,e))},decodeBits:function(o,a,u,h,f){var c=a.headerInfo,l=c.fileVersion,d=0,v=o.byteLength-a.ptr>=5?5:o.byteLength-a.ptr,p=new DataView(o,a.ptr,v),m=p.getUint8(0);d++;var y=m>>6,g=0===y?4:3-y,b=(32&m)>0,w=31&m,M=0;if(1===g)M=p.getUint8(d),d++;else if(2===g)M=p.getUint16(d,!0),d+=2;else{if(4!==g)throw"Invalid valid pixel count type";M=p.getUint32(d,!0),d+=4}var x,k,S,E,T,_,A,O,j,C=2*c.maxZError,I=c.numDims>1?c.maxValues[f]:c.zMax;if(b){for(a.counter.lut++,O=p.getUint8(d),d++,E=Math.ceil((O-1)*w/8),T=Math.ceil(E/4),k=new ArrayBuffer(4*T),S=new Uint8Array(k),a.ptr+=d,S.set(new Uint8Array(o,a.ptr,E)),A=new Uint32Array(k),a.ptr+=E,j=0;O-1>>>j;)j++;E=Math.ceil(M*j/8),T=Math.ceil(E/4),k=new ArrayBuffer(4*T),(S=new Uint8Array(k)).set(new Uint8Array(o,a.ptr,E)),x=new Uint32Array(k),a.ptr+=E,_=l>=3?n(A,w,O-1,h,C,I):i(A,w,O-1,h,C,I),l>=3?e(x,u,j,M,_):t(x,u,j,M,_)}else a.counter.bitstuffer++,j=w,a.ptr+=d,j>0&&(E=Math.ceil(M*j/8),T=Math.ceil(E/4),k=new ArrayBuffer(4*T),(S=new Uint8Array(k)).set(new Uint8Array(o,a.ptr,E)),x=new Uint32Array(k),a.ptr+=E,l>=3?null==h?s(x,u,j,M):e(x,u,j,M,!1,h,C,I):null==h?r(x,u,j,M):t(x,u,j,M,!1,h,C,I))},readTiles:function(t,i,e,n){var r=i.headerInfo,s=r.width,a=r.height,u=s*a,h=r.microBlockSize,f=r.imageType,c=o.getDataTypeSize(f),l=Math.ceil(s/h),d=Math.ceil(a/h);i.pixels.numBlocksY=d,i.pixels.numBlocksX=l,i.pixels.ptr=0;var v,p,m,y,g,b,w,M,x,k,S=0,E=0,T=0,_=0,A=0,O=0,j=0,C=0,I=0,R=0,P=0,N=0,D=0,L=0,F=0,z=new e(h*h),U=a%h||h,G=s%h||h,B=r.numDims,q=i.pixels.resultMask,V=i.pixels.resultPixels,Z=r.fileVersion>=5?14:15,$=r.zMax;for(T=0;T1?(k=V,R=T*s*h+_*h,V=new e(i.pixels.resultPixels.buffer,u*M*c,u),$=r.maxValues[M]):k=null,j=t.byteLength-i.ptr,p={},F=0,C=(v=new DataView(t,i.ptr,Math.min(10,j))).getUint8(0),F++,x=r.fileVersion>=5?4&C:0,I=C>>6&255,(C>>2&Z)!=(_*h>>3&Z))throw"integrity issue";if(x&&0===M)throw"integrity issue";if((g=3&C)>3)throw i.ptr+=F,"Invalid block encoding ("+g+")";if(2!==g)if(0===g){if(x)throw"integrity issue";if(i.counter.uncompressed++,i.ptr+=F,N=(N=A*O*c)<(D=t.byteLength-i.ptr)?N:D,m=new ArrayBuffer(N%c==0?N:N+c-N%c),new Uint8Array(m).set(new Uint8Array(t,i.ptr,N)),y=new e(m),L=0,q)for(S=0;S1&&!n&&(i.pixels.resultPixels=o.swapDimensionOrder(i.pixels.resultPixels,u,B,e))},formatFileInfo:function(t){return{fileIdentifierString:t.headerInfo.fileIdentifierString,fileVersion:t.headerInfo.fileVersion,imageType:t.headerInfo.imageType,height:t.headerInfo.height,width:t.headerInfo.width,numValidPixel:t.headerInfo.numValidPixel,microBlockSize:t.headerInfo.microBlockSize,blobSize:t.headerInfo.blobSize,maxZError:t.headerInfo.maxZError,pixelType:o.getPixelType(t.headerInfo.imageType),eofOffset:t.eofOffset,mask:t.mask?{numBytes:t.mask.numBytes}:null,pixels:{numBlocksX:t.pixels.numBlocksX,numBlocksY:t.pixels.numBlocksY,maxValue:t.headerInfo.zMax,minValue:t.headerInfo.zMin,noDataValue:t.noDataValue}}},constructConstantSurface:function(t,i){var e=t.headerInfo.zMax,n=t.headerInfo.zMin,r=t.headerInfo.maxValues,s=t.headerInfo.numDims,o=t.headerInfo.height*t.headerInfo.width,a=0,u=0,h=0,f=t.pixels.resultMask,c=t.pixels.resultPixels;if(f)if(s>1){if(i)for(a=0;a1&&n!==e)if(i)for(a=0;a=-128&&i<=127;break;case 1:e=i>=0&&i<=255;break;case 2:e=i>=-32768&&i<=32767;break;case 3:e=i>=0&&i<=65536;break;case 4:e=i>=-2147483648&&i<=2147483647;break;case 5:e=i>=0&&i<=4294967296;break;case 6:e=i>=-34027999387901484e22&&i<=34027999387901484e22;break;case 7:e=i>=-17976931348623157e292&&i<=17976931348623157e292;break;default:e=!1}return e},getDataTypeSize:function(t){var i=0;switch(t){case 0:case 1:i=1;break;case 2:case 3:i=2;break;case 4:case 5:case 6:i=4;break;case 7:i=8;break;default:i=t}return i},getDataTypeUsed:function(t,i){var e=t;switch(t){case 2:case 4:e=t-i;break;case 3:case 5:e=t-2*i;break;case 6:e=0===i?t:1===i?2:1;break;case 7:e=0===i?t:t-2*i+1;break;default:e=t}return e},getOnePixel:function(t,i,e,n){var r=0;switch(e){case 0:r=n.getInt8(i);break;case 1:r=n.getUint8(i);break;case 2:r=n.getInt16(i,!0);break;case 3:r=n.getUint16(i,!0);break;case 4:r=n.getInt32(i,!0);break;case 5:r=n.getUInt32(i,!0);break;case 6:r=n.getFloat32(i,!0);break;case 7:r=n.getFloat64(i,!0);break;default:throw"the decoder does not understand this pixel type"}return r},swapDimensionOrder:function(t,i,e,n,r){var s=0,o=0,a=0,u=0,h=t;if(e>1)if(h=new n(i*e),r)for(s=0;s5)throw"unsupported lerc version 2."+a;o.readMask(t,r),s.numValidPixel===s.width*s.height||r.pixels.resultMask||(r.pixels.resultMask=i.maskData);var h=s.width*s.height;r.pixels.resultPixels=new u(h*s.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var f,c=!i.returnPixelInterleavedDims;if(0!==s.numValidPixel)if(s.zMax===s.zMin)o.constructConstantSurface(r,c);else if(a>=4&&o.checkMinMaxRanges(t,r))o.constructConstantSurface(r,c);else{var l=new DataView(t,r.ptr,2),d=l.getUint8(0);if(r.ptr++,d)o.readDataOneSweep(t,r,u,c);else if(a>1&&s.imageType<=1&&Math.abs(s.maxZError-.5)<1e-5){var v=l.getUint8(1);if(r.ptr++,r.encodeMode=v,v>2||a<4&&v>1)throw"Invalid Huffman flag "+v;v?o.readHuffman(t,r,u,c):o.readTiles(t,r,u,c)}else o.readTiles(t,r,u,c)}r.eofOffset=r.ptr,i.inputOffset?(f=r.headerInfo.blobSize+i.inputOffset-r.ptr,Math.abs(f)>=1&&(r.eofOffset=i.inputOffset+r.headerInfo.blobSize)):(f=r.headerInfo.blobSize-r.ptr,Math.abs(f)>=1&&(r.eofOffset=r.headerInfo.blobSize));var p={width:s.width,height:s.height,pixelData:r.pixels.resultPixels,minValue:s.zMin,maxValue:s.zMax,validPixelCount:s.numValidPixel,dimCount:s.numDims,dimStats:{minValues:s.minValues,maxValues:s.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&o.isValidPixelValue(s.imageType,e)){var m=r.pixels.resultMask;for(n=0;n1&&(h&&g.push(h),M.fileInfo.mask&&M.fileInfo.mask.numBytes>0&&w++),m++,b.pixels.push(M.pixelData),b.statistics.push({minValue:M.minValue,maxValue:M.maxValue,noDataValue:M.noDataValue,dimStats:M.dimStats})}if(n>1&&w>1){for(p=b.width*b.height,b.bandMasks=g,(h=new Uint8Array(p)).set(g[0]),f=1;f1;const p=(t,i,e)=>{const n=t[l].get(i);if(n){const i=n.value;if(m(t,i)){if(g(t,n),!t[a])return}else e&&(t[d]&&(n.value.now=Date.now()),t[c].unshiftNode(n));return i.value}},m=(t,i)=>{if(!i||!i.maxAge&&!t[u])return!1;const e=Date.now()-i.now;return i.maxAge?e>i.maxAge:t[u]&&e>t[u]},y=t=>{if(t[s]>t[r])for(let i=t[c].tail;t[s]>t[r]&&null!==i;){const e=i.prev;g(t,i),i=e}},g=(t,i)=>{if(i){const e=i.value;t[h]&&t[h](e.key,e.value),t[s]-=e.length,t[l].delete(e.key),t[c].removeNode(i)}};class b{constructor(t,i,e,n,r){this.key=t,this.value=i,this.length=e,this.now=n,this.maxAge=r||0}}const w=(t,i,e,n)=>{let r=e.value;m(t,r)&&(g(t,e),t[a]||(r=void 0)),r&&i.call(n,r.value,r.key,t)};t.exports=class{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[r]=t.max||1/0;const i=t.length||v;if(this[o]="function"!=typeof i?v:i,this[a]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[u]=t.maxAge||0,this[h]=t.dispose,this[f]=t.noDisposeOnSet||!1,this[d]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[r]=t||1/0,y(this)}get max(){return this[r]}set allowStale(t){this[a]=!!t}get allowStale(){return this[a]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[u]=t,y(this)}get maxAge(){return this[u]}set lengthCalculator(t){"function"!=typeof t&&(t=v),t!==this[o]&&(this[o]=t,this[s]=0,this[c].forEach((t=>{t.length=this[o](t.value,t.key),this[s]+=t.length}))),y(this)}get lengthCalculator(){return this[o]}get length(){return this[s]}get itemCount(){return this[c].length}rforEach(t,i){i=i||this;for(let e=this[c].tail;null!==e;){const n=e.prev;w(this,t,e,i),e=n}}forEach(t,i){i=i||this;for(let e=this[c].head;null!==e;){const n=e.next;w(this,t,e,i),e=n}}keys(){return this[c].toArray().map((t=>t.key))}values(){return this[c].toArray().map((t=>t.value))}reset(){this[h]&&this[c]&&this[c].length&&this[c].forEach((t=>this[h](t.key,t.value))),this[l]=new Map,this[c]=new n,this[s]=0}dump(){return this[c].map((t=>!m(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[c]}set(t,i,e){if((e=e||this[u])&&"number"!=typeof e)throw new TypeError("maxAge must be a number");const n=e?Date.now():0,a=this[o](i,t);if(this[l].has(t)){if(a>this[r])return g(this,this[l].get(t)),!1;const o=this[l].get(t).value;return this[h]&&(this[f]||this[h](t,o.value)),o.now=n,o.maxAge=e,o.value=i,this[s]+=a-o.length,o.length=a,this.get(t),y(this),!0}const d=new b(t,i,a,n,e);return d.length>this[r]?(this[h]&&this[h](t,i),!1):(this[s]+=d.length,this[c].unshift(d),this[l].set(t,this[c].head),y(this),!0)}has(t){if(!this[l].has(t))return!1;const i=this[l].get(t).value;return!m(this,i)}get(t){return p(this,t,!0)}peek(t){return p(this,t,!1)}pop(){const t=this[c].tail;return t?(g(this,t),t.value):null}del(t){g(this,this[l].get(t))}load(t){this.reset();const i=Date.now();for(let e=t.length-1;e>=0;e--){const n=t[e],r=n.e||0;if(0===r)this.set(n.k,n.v);else{const t=r-i;t>0&&this.set(n.k,n.v,t)}}}prune(){this[l].forEach(((t,i)=>p(this,i,!1)))}}},81170:function(t){var i={thin:100,hairline:100,"ultra-light":100,"extra-light":100,light:200,book:300,regular:400,normal:400,plain:400,roman:400,standard:400,medium:500,"semi-bold":600,"demi-bold":600,bold:700,heavy:800,black:800,"extra-bold":800,"ultra-black":900,"extra-black":900,"ultra-bold":900,"heavy-black":900,fat:900,poster:900},e=" ",n=/(italic|oblique)$/i,r={};t.exports=function(t,s,o){var a=r[t];if(!a){Array.isArray(t)||(t=[t]);for(var u=400,h="normal",f=[],c=0,l=t.length;c=1.5*e;return Math.round(t/e)+" "+n+(r?"s":"")}t.exports=function(t,u){u=u||{};var h=typeof t;if("string"===h&&t.length>0)return function(t){if((t=String(t)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!a)return;var u=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*o;case"weeks":case"week":case"w":return u*s;case"days":case"day":case"d":return u*r;case"hours":case"hour":case"hrs":case"hr":case"h":return u*n;case"minutes":case"minute":case"mins":case"min":case"m":return u*e;case"seconds":case"second":case"secs":case"sec":case"s":return u*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(t);if("number"===h&&isFinite(t))return u.long?function(t){var s=Math.abs(t);if(s>=r)return a(t,s,r,"day");if(s>=n)return a(t,s,n,"hour");if(s>=e)return a(t,s,e,"minute");if(s>=i)return a(t,s,i,"second");return t+" ms"}(t):function(t){var s=Math.abs(t);if(s>=r)return Math.round(t/r)+"d";if(s>=n)return Math.round(t/n)+"h";if(s>=e)return Math.round(t/e)+"m";if(s>=i)return Math.round(t/i)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},67493:function(t,i,e){"use strict";e.r(i),e.d(i,{Observable:function(){return x},Subject:function(){return R},filter:function(){return E},flatMap:function(){return A},interval:function(){return O},map:function(){return C},merge:function(){return I},multicast:function(){return P},scan:function(){return D},unsubscribe:function(){return k}});var n=function(t,i,e,n){return new(e||(e=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))};class r{constructor(t){this._baseObserver=t,this._pendingPromises=new Set}complete(){Promise.all(this._pendingPromises).then((()=>this._baseObserver.complete())).catch((t=>this._baseObserver.error(t)))}error(t){this._baseObserver.error(t)}schedule(t){const i=Promise.all(this._pendingPromises),e=[],r=t=>e.push(t),s=Promise.resolve().then((()=>n(this,void 0,void 0,(function*(){yield i,yield t(r),this._pendingPromises.delete(s);for(const t of e)this._baseObserver.next(t)})))).catch((t=>{this._pendingPromises.delete(s),this._baseObserver.error(t)}));this._pendingPromises.add(s)}}const s=()=>"function"==typeof Symbol,o=t=>s()&&Boolean(Symbol[t]),a=t=>o(t)?Symbol[t]:"@@"+t;o("asyncIterator")||(Symbol.asyncIterator=Symbol.asyncIterator||Symbol.for("Symbol.asyncIterator"));const u=a("iterator"),h=a("observable"),f=a("species");function c(t,i){const e=t[i];if(null!=e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}}function l(t){let i=t.constructor;return void 0!==i&&(i=i[f],null===i&&(i=void 0)),void 0!==i?i:M}function d(t){d.log?d.log(t):setTimeout((()=>{throw t}),0)}function v(t){Promise.resolve().then((()=>{try{t()}catch(t){d(t)}}))}function p(t){const i=t._cleanup;if(void 0!==i&&(t._cleanup=void 0,i))try{if("function"==typeof i)i();else{const t=c(i,"unsubscribe");t&&t.call(i)}}catch(t){d(t)}}function m(t){t._observer=void 0,t._queue=void 0,t._state="closed"}function y(t,i,e){t._state="running";const n=t._observer;try{const r=n?c(n,i):void 0;switch(i){case"next":r&&r.call(n,e);break;case"error":if(m(t),!r)throw e;r.call(n,e);break;case"complete":m(t),r&&r.call(n)}}catch(t){d(t)}"closed"===t._state?p(t):"running"===t._state&&(t._state="ready")}function g(t,i,e){if("closed"!==t._state)return"buffering"===t._state?(t._queue=t._queue||[],void t._queue.push({type:i,value:e})):"ready"!==t._state?(t._state="buffering",t._queue=[{type:i,value:e}],void v((()=>function(t){const i=t._queue;if(i){t._queue=void 0,t._state="ready";for(const e of i)if(y(t,e.type,e.value),"closed"===t._state)break}}(t)))):void y(t,i,e)}class b{constructor(t,i){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";const e=new w(this);try{this._cleanup=i.call(void 0,e)}catch(t){e.error(t)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(m(this),p(this))}}class w{constructor(t){this._subscription=t}get closed(){return"closed"===this._subscription._state}next(t){g(this._subscription,"next",t)}error(t){g(this._subscription,"error",t)}complete(){g(this._subscription,"complete")}}class M{constructor(t){if(!(this instanceof M))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t,i,e){return"object"==typeof t&&null!==t||(t={next:t,error:i,complete:e}),new b(t,this._subscriber)}pipe(t,...i){let e=this;for(const n of[t,...i])e=n(e);return e}tap(t,i,e){const n="object"!=typeof t||null===t?{next:t,error:i,complete:e}:t;return new M((t=>this.subscribe({next(i){n.next&&n.next(i),t.next(i)},error(i){n.error&&n.error(i),t.error(i)},complete(){n.complete&&n.complete(),t.complete()},start(t){n.start&&n.start(t)}})))}forEach(t){return new Promise(((i,e)=>{if("function"!=typeof t)return void e(new TypeError(t+" is not a function"));function n(){r.unsubscribe(),i(void 0)}const r=this.subscribe({next(i){try{t(i,n)}catch(t){e(t),r.unsubscribe()}},error(t){e(t)},complete(){i(void 0)}})}))}map(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))((i=>this.subscribe({next(e){let n=e;try{n=t(e)}catch(t){return i.error(t)}i.next(n)},error(t){i.error(t)},complete(){i.complete()}})))}filter(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");return new(l(this))((i=>this.subscribe({next(e){try{if(!t(e))return}catch(t){return i.error(t)}i.next(e)},error(t){i.error(t)},complete(){i.complete()}})))}reduce(t,i){if("function"!=typeof t)throw new TypeError(t+" is not a function");const e=l(this),n=arguments.length>1;let r=!1,s=i;return new e((i=>this.subscribe({next(e){const o=!r;if(r=!0,!o||n)try{s=t(s,e)}catch(t){return i.error(t)}else s=e},error(t){i.error(t)},complete(){if(!r&&!n)return i.error(new TypeError("Cannot reduce an empty sequence"));i.next(s),i.complete()}})))}concat(...t){const i=l(this);return new i((e=>{let n,r=0;return function s(o){n=o.subscribe({next(t){e.next(t)},error(t){e.error(t)},complete(){r===t.length?(n=void 0,e.complete()):s(i.from(t[r++]))}})}(this),()=>{n&&(n.unsubscribe(),n=void 0)}}))}flatMap(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");const i=l(this);return new i((e=>{const n=[],r=this.subscribe({next(r){let o;if(t)try{o=t(r)}catch(t){return e.error(t)}else o=r;const a=i.from(o).subscribe({next(t){e.next(t)},error(t){e.error(t)},complete(){const t=n.indexOf(a);t>=0&&n.splice(t,1),s()}});n.push(a)},error(t){e.error(t)},complete(){s()}});function s(){r.closed&&0===n.length&&e.complete()}return()=>{n.forEach((t=>t.unsubscribe())),r.unsubscribe()}}))}[(Symbol.observable,h)](){return this}static from(t){const i="function"==typeof this?this:M;if(null==t)throw new TypeError(t+" is not an object");const e=c(t,h);if(e){const n=e.call(t);if(Object(n)!==n)throw new TypeError(n+" is not an object");return function(t){return t instanceof M}(n)&&n.constructor===i?n:new i((t=>n.subscribe(t)))}if(o("iterator")){const e=c(t,u);if(e)return new i((i=>{v((()=>{if(!i.closed){for(const n of e.call(t))if(i.next(n),i.closed)return;i.complete()}}))}))}if(Array.isArray(t))return new i((i=>{v((()=>{if(!i.closed){for(const e of t)if(i.next(e),i.closed)return;i.complete()}}))}));throw new TypeError(t+" is not observable")}static of(...t){return new("function"==typeof this?this:M)((i=>{v((()=>{if(!i.closed){for(const e of t)if(i.next(e),i.closed)return;i.complete()}}))}))}static get[f](){return this}}s()&&Object.defineProperty(M,Symbol("extensions"),{value:{symbol:h,hostReportError:d},configurable:!0});var x=M;var k=function(t){"function"==typeof t?t():t&&"function"==typeof t.unsubscribe&&t.unsubscribe()},S=function(t,i,e,n){return new(e||(e=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))};var E=function(t){return i=>new x((e=>{const n=new r(e),s=i.subscribe({complete(){n.complete()},error(t){n.error(t)},next(i){n.schedule((e=>S(this,void 0,void 0,(function*(){(yield t(i))&&e(i)}))))}});return()=>k(s)}))};var T=function(t,i,e,n){return new(e||(e=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))},_=function(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,e=t[Symbol.asyncIterator];return e?e.call(t):(t="function"==typeof __values?__values(t):t[Symbol.iterator](),i={},n("next"),n("throw"),n("return"),i[Symbol.asyncIterator]=function(){return this},i);function n(e){i[e]=t[e]&&function(i){return new Promise((function(n,r){(function(t,i,e,n){Promise.resolve(n).then((function(i){t({value:i,done:e})}),i)})(n,r,(i=t[e](i)).done,i.value)}))}}};var A=function(t){return i=>new x((e=>{const n=new r(e),s=i.subscribe({complete(){n.complete()},error(t){n.error(t)},next(i){n.schedule((e=>T(this,void 0,void 0,(function*(){var n,r;const s=yield t(i);if((h=s)&&o("iterator")&&h[Symbol.iterator]||function(t){return t&&o("asyncIterator")&&t[Symbol.asyncIterator]}(s))try{for(var a,u=_(s);!(a=yield u.next()).done;){const t=a.value;e(t)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=u.return)&&(yield r.call(u))}finally{if(n)throw n.error}}else s.map((t=>e(t)));var h}))))}});return()=>k(s)}))};function O(t){return new M((i=>{let e=0;const n=setInterval((()=>{i.next(e++)}),t);return()=>clearInterval(n)}))}var j=function(t,i,e,n){return new(e||(e=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))};var C=function(t){return i=>new x((e=>{const n=new r(e),s=i.subscribe({complete(){n.complete()},error(t){n.error(t)},next(i){n.schedule((e=>j(this,void 0,void 0,(function*(){const n=yield t(i);e(n)}))))}});return()=>k(s)}))};var I=function(...t){return 0===t.length?M.from([]):new M((i=>{let e=0;const n=t.map((n=>n.subscribe({error(t){i.error(t),r()},next(t){i.next(t)},complete(){++e===t.length&&(i.complete(),r())}}))),r=()=>{n.forEach((t=>k(t)))};return r}))};var R=class extends x{constructor(){super((t=>(this._observers.add(t),()=>this._observers.delete(t)))),this._observers=new Set}next(t){for(const i of this._observers)i.next(t)}error(t){for(const i of this._observers)i.error(t)}complete(){for(const t of this._observers)t.complete()}};var P=function(t){const i=new R;let e,n=0;return new x((r=>{e||(e=t.subscribe(i));const s=i.subscribe(r);return n++,()=>{n--,s.unsubscribe(),0===n&&(k(e),e=void 0)}}))},N=function(t,i,e,n){return new(e||(e=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))};var D=function(t,i){return e=>new x((n=>{let s,o=0;const a=new r(n),u=e.subscribe({complete(){a.complete()},error(t){a.error(t)},next(e){a.schedule((n=>N(this,void 0,void 0,(function*(){const r=0===o?void 0===i?e:i:s;s=yield t(r,e,o++),n(s)}))))}});return()=>k(u)}))}},45613:function(t,i,e){"use strict";var n=e(11863),r=e(37609),s=e(19141),o=e(92436),a=e(55710),u=e(88894),h=e(38235),f=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=r.assign({chunkSize:16384,windowBits:0,to:""},t||{});var i=this.options;i.raw&&i.windowBits>=0&&i.windowBits<16&&(i.windowBits=-i.windowBits,0===i.windowBits&&(i.windowBits=-15)),!(i.windowBits>=0&&i.windowBits<16)||t&&t.windowBits||(i.windowBits+=32),i.windowBits>15&&i.windowBits<48&&0==(15&i.windowBits)&&(i.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var e=n.inflateInit2(this.strm,i.windowBits);if(e!==o.Z_OK)throw new Error(a[e]);if(this.header=new h,n.inflateGetHeader(this.strm,this.header),i.dictionary&&("string"==typeof i.dictionary?i.dictionary=s.string2buf(i.dictionary):"[object ArrayBuffer]"===f.call(i.dictionary)&&(i.dictionary=new Uint8Array(i.dictionary)),i.raw&&(e=n.inflateSetDictionary(this.strm,i.dictionary))!==o.Z_OK))throw new Error(a[e])}function l(t,i){var e=new c(i);if(e.push(t,!0),e.err)throw e.msg||a[e.err];return e.result}c.prototype.push=function(t,i){var e,a,u,h,c,l=this.strm,d=this.options.chunkSize,v=this.options.dictionary,p=!1;if(this.ended)return!1;a=i===~~i?i:!0===i?o.Z_FINISH:o.Z_NO_FLUSH,"string"==typeof t?l.input=s.binstring2buf(t):"[object ArrayBuffer]"===f.call(t)?l.input=new Uint8Array(t):l.input=t,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new r.Buf8(d),l.next_out=0,l.avail_out=d),(e=n.inflate(l,o.Z_NO_FLUSH))===o.Z_NEED_DICT&&v&&(e=n.inflateSetDictionary(this.strm,v)),e===o.Z_BUF_ERROR&&!0===p&&(e=o.Z_OK,p=!1),e!==o.Z_STREAM_END&&e!==o.Z_OK)return this.onEnd(e),this.ended=!0,!1;l.next_out&&(0!==l.avail_out&&e!==o.Z_STREAM_END&&(0!==l.avail_in||a!==o.Z_FINISH&&a!==o.Z_SYNC_FLUSH)||("string"===this.options.to?(u=s.utf8border(l.output,l.next_out),h=l.next_out-u,c=s.buf2string(l.output,u),l.next_out=h,l.avail_out=d-h,h&&r.arraySet(l.output,l.output,u,h,0),this.onData(c)):this.onData(r.shrinkBuf(l.output,l.next_out)))),0===l.avail_in&&0===l.avail_out&&(p=!0)}while((l.avail_in>0||0===l.avail_out)&&e!==o.Z_STREAM_END);return e===o.Z_STREAM_END&&(a=o.Z_FINISH),a===o.Z_FINISH?(e=n.inflateEnd(this.strm),this.onEnd(e),this.ended=!0,e===o.Z_OK):a!==o.Z_SYNC_FLUSH||(this.onEnd(o.Z_OK),l.avail_out=0,!0)},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){t===o.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=r.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},i.rr=l},37609:function(t,i){"use strict";var e="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,i){return Object.prototype.hasOwnProperty.call(t,i)}i.assign=function(t){for(var i=Array.prototype.slice.call(arguments,1);i.length;){var e=i.shift();if(e){if("object"!=typeof e)throw new TypeError(e+"must be non-object");for(var r in e)n(e,r)&&(t[r]=e[r])}}return t},i.shrinkBuf=function(t,i){return t.length===i?t:t.subarray?t.subarray(0,i):(t.length=i,t)};var r={arraySet:function(t,i,e,n,r){if(i.subarray&&t.subarray)t.set(i.subarray(e,e+n),r);else for(var s=0;s=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function u(t,i){if(i<65534&&(t.subarray&&s||!t.subarray&&r))return String.fromCharCode.apply(null,n.shrinkBuf(t,i));for(var e="",o=0;o>>6,i[o++]=128|63&e):e<65536?(i[o++]=224|e>>>12,i[o++]=128|e>>>6&63,i[o++]=128|63&e):(i[o++]=240|e>>>18,i[o++]=128|e>>>12&63,i[o++]=128|e>>>6&63,i[o++]=128|63&e);return i},i.buf2binstring=function(t){return u(t,t.length)},i.binstring2buf=function(t){for(var i=new n.Buf8(t.length),e=0,r=i.length;e4)h[n++]=65533,e+=s-1;else{for(r&=2===s?31:3===s?15:7;s>1&&e1?h[n++]=65533:r<65536?h[n++]=r:(r-=65536,h[n++]=55296|r>>10&1023,h[n++]=56320|1023&r)}return u(h,n)},i.utf8border=function(t,i){var e;for((i=i||t.length)>t.length&&(i=t.length),e=i-1;e>=0&&128==(192&t[e]);)e--;return e<0||0===e?i:e+o[t[e]]>i?e:i}},85530:function(t){"use strict";t.exports=function(t,i,e,n){for(var r=65535&t|0,s=t>>>16&65535|0,o=0;0!==e;){e-=o=e>2e3?2e3:e;do{s=s+(r=r+i[n++]|0)|0}while(--o);r%=65521,s%=65521}return r|s<<16|0}},92436:function(t){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},91383:function(t){"use strict";var i=function(){for(var t,i=[],e=0;e<256;e++){t=e;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;i[e]=t}return i}();t.exports=function(t,e,n,r){var s=i,o=r+n;t^=-1;for(var a=r;a>>8^s[255&(t^e[a])];return-1^t}},38235:function(t){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},58121:function(t){"use strict";t.exports=function(t,i){var e,n,r,s,o,a,u,h,f,c,l,d,v,p,m,y,g,b,w,M,x,k,S,E,T;e=t.state,n=t.next_in,E=t.input,r=n+(t.avail_in-5),s=t.next_out,T=t.output,o=s-(i-t.avail_out),a=s+(t.avail_out-257),u=e.dmax,h=e.wsize,f=e.whave,c=e.wnext,l=e.window,d=e.hold,v=e.bits,p=e.lencode,m=e.distcode,y=(1<>>=w=b>>>24,v-=w,0===(w=b>>>16&255))T[s++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=p[(65535&b)+(d&(1<>>=w,v-=w),v<15&&(d+=E[n++]<>>=w=b>>>24,v-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=m[(65535&b)+(d&(1<u){t.msg="invalid distance too far back",e.mode=30;break t}if(d>>>=w,v-=w,x>(w=s-o)){if((w=x-w)>f&&e.sane){t.msg="invalid distance too far back",e.mode=30;break t}if(k=0,S=l,0===c){if(k+=h-w,w2;)T[s++]=S[k++],T[s++]=S[k++],T[s++]=S[k++],M-=3;M&&(T[s++]=S[k++],M>1&&(T[s++]=S[k++]))}else{k=s-x;do{T[s++]=T[k++],T[s++]=T[k++],T[s++]=T[k++],M-=3}while(M>2);M&&(T[s++]=T[k++],M>1&&(T[s++]=T[k++]))}break}}break}}while(n>3,d&=(1<<(v-=M<<3))-1,t.next_in=n,t.next_out=s,t.avail_in=n>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(t){var i;return t&&t.state?(i=t.state,t.total_in=t.total_out=i.total=0,t.msg="",i.wrap&&(t.adler=1&i.wrap),i.mode=1,i.last=0,i.havedict=0,i.dmax=32768,i.head=null,i.hold=0,i.bits=0,i.lencode=i.lendyn=new n.Buf32(852),i.distcode=i.distdyn=new n.Buf32(592),i.sane=1,i.back=-1,0):u}function v(t){var i;return t&&t.state?((i=t.state).wsize=0,i.whave=0,i.wnext=0,d(t)):u}function p(t,i){var e,n;return t&&t.state?(n=t.state,i<0?(e=0,i=-i):(e=1+(i>>4),i<48&&(i&=15)),i&&(i<8||i>15)?u:(null!==n.window&&n.wbits!==i&&(n.window=null),n.wrap=e,n.wbits=i,v(t))):u}function m(t,i){var e,n;return t?(n=new l,t.state=n,n.window=null,0!==(e=p(t,i))&&(t.state=null),e):u}var y,g,b=!0;function w(t){if(b){var i;for(y=new n.Buf32(512),g=new n.Buf32(32),i=0;i<144;)t.lens[i++]=8;for(;i<256;)t.lens[i++]=9;for(;i<280;)t.lens[i++]=7;for(;i<288;)t.lens[i++]=8;for(a(1,t.lens,0,288,y,0,t.work,{bits:9}),i=0;i<32;)t.lens[i++]=5;a(2,t.lens,0,32,g,0,t.work,{bits:5}),b=!1}t.lencode=y,t.lenbits=9,t.distcode=g,t.distbits=5}function M(t,i,e,r){var s,o=t.state;return null===o.window&&(o.wsize=1<=o.wsize?(n.arraySet(o.window,i,e-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((s=o.wsize-o.wnext)>r&&(s=r),n.arraySet(o.window,i,e-r,s,o.wnext),(r-=s)?(n.arraySet(o.window,i,e-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=s,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,e.check=s(e.check,F,2,0),g=0,b=0,e.mode=2;break}if(e.flags=0,e.head&&(e.head.done=!1),!(1&e.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",e.mode=f;break}if(8!=(15&g)){t.msg="unknown compression method",e.mode=f;break}if(b-=4,R=8+(15&(g>>>=4)),0===e.wbits)e.wbits=R;else if(R>e.wbits){t.msg="invalid window size",e.mode=f;break}e.dmax=1<>8&1),512&e.flags&&(F[0]=255&g,F[1]=g>>>8&255,e.check=s(e.check,F,2,0)),g=0,b=0,e.mode=3;case 3:for(;b<32;){if(0===m)break t;m--,g+=l[v++]<>>8&255,F[2]=g>>>16&255,F[3]=g>>>24&255,e.check=s(e.check,F,4,0)),g=0,b=0,e.mode=4;case 4:for(;b<16;){if(0===m)break t;m--,g+=l[v++]<>8),512&e.flags&&(F[0]=255&g,F[1]=g>>>8&255,e.check=s(e.check,F,2,0)),g=0,b=0,e.mode=5;case 5:if(1024&e.flags){for(;b<16;){if(0===m)break t;m--,g+=l[v++]<>>8&255,e.check=s(e.check,F,2,0)),g=0,b=0}else e.head&&(e.head.extra=null);e.mode=6;case 6:if(1024&e.flags&&((S=e.length)>m&&(S=m),S&&(e.head&&(R=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Array(e.head.extra_len)),n.arraySet(e.head.extra,l,v,S,R)),512&e.flags&&(e.check=s(e.check,l,S,v)),m-=S,v+=S,e.length-=S),e.length))break t;e.length=0,e.mode=7;case 7:if(2048&e.flags){if(0===m)break t;S=0;do{R=l[v+S++],e.head&&R&&e.length<65536&&(e.head.name+=String.fromCharCode(R))}while(R&&S>9&1,e.head.done=!0),t.adler=e.check=0,e.mode=h;break;case 10:for(;b<32;){if(0===m)break t;m--,g+=l[v++]<>>=7&b,b-=7&b,e.mode=27;break}for(;b<3;){if(0===m)break t;m--,g+=l[v++]<>>=1)){case 0:e.mode=14;break;case 1:if(w(e),e.mode=20,6===i){g>>>=2,b-=2;break t}break;case 2:e.mode=17;break;case 3:t.msg="invalid block type",e.mode=f}g>>>=2,b-=2;break;case 14:for(g>>>=7&b,b-=7&b;b<32;){if(0===m)break t;m--,g+=l[v++]<>>16^65535)){t.msg="invalid stored block lengths",e.mode=f;break}if(e.length=65535&g,g=0,b=0,e.mode=15,6===i)break t;case 15:e.mode=16;case 16:if(S=e.length){if(S>m&&(S=m),S>y&&(S=y),0===S)break t;n.arraySet(d,l,v,S,p),m-=S,v+=S,y-=S,p+=S,e.length-=S;break}e.mode=h;break;case 17:for(;b<14;){if(0===m)break t;m--,g+=l[v++]<>>=5,b-=5,e.ndist=1+(31&g),g>>>=5,b-=5,e.ncode=4+(15&g),g>>>=4,b-=4,e.nlen>286||e.ndist>30){t.msg="too many length or distance symbols",e.mode=f;break}e.have=0,e.mode=18;case 18:for(;e.have>>=3,b-=3}for(;e.have<19;)e.lens[z[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,N={bits:e.lenbits},P=a(0,e.lens,0,19,e.lencode,0,e.work,N),e.lenbits=N.bits,P){t.msg="invalid code lengths set",e.mode=f;break}e.have=0,e.mode=19;case 19:for(;e.have>>16&255,O=65535&L,!((_=L>>>24)<=b);){if(0===m)break t;m--,g+=l[v++]<>>=_,b-=_,e.lens[e.have++]=O;else{if(16===O){for(D=_+2;b>>=_,b-=_,0===e.have){t.msg="invalid bit length repeat",e.mode=f;break}R=e.lens[e.have-1],S=3+(3&g),g>>>=2,b-=2}else if(17===O){for(D=_+3;b>>=_)),g>>>=3,b-=3}else{for(D=_+7;b>>=_)),g>>>=7,b-=7}if(e.have+S>e.nlen+e.ndist){t.msg="invalid bit length repeat",e.mode=f;break}for(;S--;)e.lens[e.have++]=R}}if(e.mode===f)break;if(0===e.lens[256]){t.msg="invalid code -- missing end-of-block",e.mode=f;break}if(e.lenbits=9,N={bits:e.lenbits},P=a(1,e.lens,0,e.nlen,e.lencode,0,e.work,N),e.lenbits=N.bits,P){t.msg="invalid literal/lengths set",e.mode=f;break}if(e.distbits=6,e.distcode=e.distdyn,N={bits:e.distbits},P=a(2,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,N),e.distbits=N.bits,P){t.msg="invalid distances set",e.mode=f;break}if(e.mode=20,6===i)break t;case 20:e.mode=21;case 21:if(m>=6&&y>=258){t.next_out=p,t.avail_out=y,t.next_in=v,t.avail_in=m,e.hold=g,e.bits=b,o(t,k),p=t.next_out,d=t.output,y=t.avail_out,v=t.next_in,l=t.input,m=t.avail_in,g=e.hold,b=e.bits,e.mode===h&&(e.back=-1);break}for(e.back=0;A=(L=e.lencode[g&(1<>>16&255,O=65535&L,!((_=L>>>24)<=b);){if(0===m)break t;m--,g+=l[v++]<>j)])>>>16&255,O=65535&L,!(j+(_=L>>>24)<=b);){if(0===m)break t;m--,g+=l[v++]<>>=j,b-=j,e.back+=j}if(g>>>=_,b-=_,e.back+=_,e.length=O,0===A){e.mode=26;break}if(32&A){e.back=-1,e.mode=h;break}if(64&A){t.msg="invalid literal/length code",e.mode=f;break}e.extra=15&A,e.mode=22;case 22:if(e.extra){for(D=e.extra;b>>=e.extra,b-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=23;case 23:for(;A=(L=e.distcode[g&(1<>>16&255,O=65535&L,!((_=L>>>24)<=b);){if(0===m)break t;m--,g+=l[v++]<>j)])>>>16&255,O=65535&L,!(j+(_=L>>>24)<=b);){if(0===m)break t;m--,g+=l[v++]<>>=j,b-=j,e.back+=j}if(g>>>=_,b-=_,e.back+=_,64&A){t.msg="invalid distance code",e.mode=f;break}e.offset=O,e.extra=15&A,e.mode=24;case 24:if(e.extra){for(D=e.extra;b>>=e.extra,b-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){t.msg="invalid distance too far back",e.mode=f;break}e.mode=25;case 25:if(0===y)break t;if(S=k-y,e.offset>S){if((S=e.offset-S)>e.whave&&e.sane){t.msg="invalid distance too far back",e.mode=f;break}S>e.wnext?(S-=e.wnext,E=e.wsize-S):E=e.wnext-S,S>e.length&&(S=e.length),T=e.window}else T=d,E=p-e.offset,S=e.length;S>y&&(S=y),y-=S,e.length-=S;do{d[p++]=T[E++]}while(--S);0===e.length&&(e.mode=21);break;case 26:if(0===y)break t;d[p++]=e.length,y--,e.mode=21;break;case 27:if(e.wrap){for(;b<32;){if(0===m)break t;m--,g|=l[v++]<=1&&0===D[_];_--);if(A>_&&(A=_),0===_)return f[c++]=20971520,f[c++]=20971520,d.bits=1,0;for(T=1;T<_&&0===D[T];T++);for(A0&&(0===t||1!==_))return-1;for(L[1]=0,S=1;S852||2===t&&I>592)return 1;for(;;){w=S-j,l[E]b?(M=F[z+l[E]],x=P[N+l[E]]):(M=96,x=0),v=1<>j)+(p-=v)]=w<<24|M<<16|x|0}while(0!==p);for(v=1<>=1;if(0!==v?(R&=v-1,R+=v):R=0,E++,0==--D[S]){if(S===_)break;S=i[e+l[E]]}if(S>A&&(R&y)!==m){for(0===j&&(j=A),g+=T,C=1<<(O=S-j);O+j<_&&!((C-=D[O+j])<=0);)O++,C<<=1;if(I+=1<852||2===t&&I>592)return 1;f[m=R&y]=A<<24|O<<16|g-c|0}}return 0!==R&&(f[g+R]=S-j<<24|64<<16|0),d.bits=A,0}},55710:function(t){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},88894:function(t){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},58882:function(t,i,e){"use strict";t.exports=r;var n=e(78898);function r(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}r.Varint=0,r.Fixed64=1,r.Bytes=2,r.Fixed32=5;var s=4294967296,o=1/s,a="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function u(t){return t.type===r.Bytes?t.readVarint()+t.pos:t.pos+1}function h(t,i,e){return e?4294967296*i+(t>>>0):4294967296*(i>>>0)+(t>>>0)}function f(t,i,e){var n=i<=16383?1:i<=2097151?2:i<=268435455?3:Math.floor(Math.log(i)/(7*Math.LN2));e.realloc(n);for(var r=e.pos-1;r>=t;r--)e.buf[r+n]=e.buf[r]}function c(t,i){for(var e=0;e>>8,t[e+2]=i>>>16,t[e+3]=i>>>24}function x(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16)+(t[i+3]<<24)}r.prototype={destroy:function(){this.buf=null},readFields:function(t,i,e){for(e=e||this.length;this.pos>3,s=this.pos;this.type=7&n,t(r,i,this),this.pos===s&&this.skip(n)}return i},readMessage:function(t,i){return this.readFields(t,i,this.readVarint()+this.pos)},readFixed32:function(){var t=w(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=x(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=w(this.buf,this.pos)+w(this.buf,this.pos+4)*s;return this.pos+=8,t},readSFixed64:function(){var t=w(this.buf,this.pos)+x(this.buf,this.pos+4)*s;return this.pos+=8,t},readFloat:function(){var t=n.read(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=n.read(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var i,e,n=this.buf;return i=127&(e=n[this.pos++]),e<128?i:(i|=(127&(e=n[this.pos++]))<<7,e<128?i:(i|=(127&(e=n[this.pos++]))<<14,e<128?i:(i|=(127&(e=n[this.pos++]))<<21,e<128?i:function(t,i,e){var n,r,s=e.buf;if(r=s[e.pos++],n=(112&r)>>4,r<128)return h(t,n,i);if(r=s[e.pos++],n|=(127&r)<<3,r<128)return h(t,n,i);if(r=s[e.pos++],n|=(127&r)<<10,r<128)return h(t,n,i);if(r=s[e.pos++],n|=(127&r)<<17,r<128)return h(t,n,i);if(r=s[e.pos++],n|=(127&r)<<24,r<128)return h(t,n,i);if(r=s[e.pos++],n|=(1&r)<<31,r<128)return h(t,n,i);throw new Error("Expected varint not more than 10 bytes")}(i|=(15&(e=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,i=this.pos;return this.pos=t,t-i>=12&&a?function(t,i,e){return a.decode(t.subarray(i,e))}(this.buf,i,t):function(t,i,e){var n="",r=i;for(;r239?4:u>223?3:u>191?2:1;if(r+f>e)break;1===f?u<128&&(h=u):2===f?128==(192&(s=t[r+1]))&&(h=(31&u)<<6|63&s)<=127&&(h=null):3===f?(s=t[r+1],o=t[r+2],128==(192&s)&&128==(192&o)&&((h=(15&u)<<12|(63&s)<<6|63&o)<=2047||h>=55296&&h<=57343)&&(h=null)):4===f&&(s=t[r+1],o=t[r+2],a=t[r+3],128==(192&s)&&128==(192&o)&&128==(192&a)&&((h=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)<=65535||h>=1114112)&&(h=null)),null===h?(h=65533,f=1):h>65535&&(h-=65536,n+=String.fromCharCode(h>>>10&1023|55296),h=56320|1023&h),n+=String.fromCharCode(h),r+=f}return n}(this.buf,i,t)},readBytes:function(){var t=this.readVarint()+this.pos,i=this.buf.subarray(this.pos,t);return this.pos=t,i},readPackedVarint:function(t,i){if(this.type!==r.Bytes)return t.push(this.readVarint(i));var e=u(this);for(t=t||[];this.pos127;);else if(i===r.Bytes)this.pos=this.readVarint()+this.pos;else if(i===r.Fixed32)this.pos+=4;else{if(i!==r.Fixed64)throw new Error("Unimplemented type: "+i);this.pos+=8}},writeTag:function(t,i){this.writeVarint(t<<3|i)},realloc:function(t){for(var i=this.length||16;i268435455||t<0?function(t,i){var e,n;t>=0?(e=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(e=~(-t%4294967296))?e=e+1|0:(e=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");i.realloc(10),function(t,i,e){e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos++]=127&t|128,t>>>=7,e.buf[e.pos]=127&t}(e,0,i),function(t,i){var e=(7&t)<<4;if(i.buf[i.pos++]|=e|((t>>>=3)?128:0),!t)return;if(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(i.buf[i.pos++]=127&t|((t>>>=7)?128:0),!t)return;i.buf[i.pos++]=127&t}(n,i)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var i=this.pos;this.pos=function(t,i,e){for(var n,r,s=0;s55295&&n<57344){if(!r){n>56319||s+1===i.length?(t[e++]=239,t[e++]=191,t[e++]=189):r=n;continue}if(n<56320){t[e++]=239,t[e++]=191,t[e++]=189,r=n;continue}n=r-55296<<10|n-56320|65536,r=null}else r&&(t[e++]=239,t[e++]=191,t[e++]=189,r=null);n<128?t[e++]=n:(n<2048?t[e++]=n>>6|192:(n<65536?t[e++]=n>>12|224:(t[e++]=n>>18|240,t[e++]=n>>12&63|128),t[e++]=n>>6&63|128),t[e++]=63&n|128)}return e}(this.buf,t,this.pos);var e=this.pos-i;e>=128&&f(i,e,this),this.pos=i-1,this.writeVarint(e),this.pos+=e},writeFloat:function(t){this.realloc(4),n.write(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),n.write(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var i=t.length;this.writeVarint(i),this.realloc(i);for(var e=0;e=128&&f(e,n,this),this.pos=e-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,i,e){this.writeTag(t,r.Bytes),this.writeRawMessage(i,e)},writePackedVarint:function(t,i){i.length&&this.writeMessage(t,c,i)},writePackedSVarint:function(t,i){i.length&&this.writeMessage(t,l,i)},writePackedBoolean:function(t,i){i.length&&this.writeMessage(t,p,i)},writePackedFloat:function(t,i){i.length&&this.writeMessage(t,d,i)},writePackedDouble:function(t,i){i.length&&this.writeMessage(t,v,i)},writePackedFixed32:function(t,i){i.length&&this.writeMessage(t,m,i)},writePackedSFixed32:function(t,i){i.length&&this.writeMessage(t,y,i)},writePackedFixed64:function(t,i){i.length&&this.writeMessage(t,g,i)},writePackedSFixed64:function(t,i){i.length&&this.writeMessage(t,b,i)},writeBytesField:function(t,i){this.writeTag(t,r.Bytes),this.writeBytes(i)},writeFixed32Field:function(t,i){this.writeTag(t,r.Fixed32),this.writeFixed32(i)},writeSFixed32Field:function(t,i){this.writeTag(t,r.Fixed32),this.writeSFixed32(i)},writeFixed64Field:function(t,i){this.writeTag(t,r.Fixed64),this.writeFixed64(i)},writeSFixed64Field:function(t,i){this.writeTag(t,r.Fixed64),this.writeSFixed64(i)},writeVarintField:function(t,i){this.writeTag(t,r.Varint),this.writeVarint(i)},writeSVarintField:function(t,i){this.writeTag(t,r.Varint),this.writeSVarint(i)},writeStringField:function(t,i){this.writeTag(t,r.Bytes),this.writeString(i)},writeFloatField:function(t,i){this.writeTag(t,r.Fixed32),this.writeFloat(i)},writeDoubleField:function(t,i){this.writeTag(t,r.Fixed64),this.writeDouble(i)},writeBooleanField:function(t,i){this.writeVarintField(t,Boolean(i))}}},85752:function(t,i,e){"use strict";e.d(i,{Z:function(){return de}});var n=6378137,r=.0066943799901413165,s=484813681109536e-20,o=Math.PI/2,a=1e-10,u=.017453292519943295,h=57.29577951308232,f=Math.PI/4,c=2*Math.PI,l=3.14159265359,d={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},v={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},p=/[\s_\-\/\(\)]/g;function m(t,i){if(t[i])return t[i];for(var e,n=Object.keys(t),r=i.toLowerCase().replace(p,""),s=-1;++s=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},S.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(x.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},S.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},S.prototype.number=function(t){if(!k.test(t)){if(x.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},S.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},S.prototype.keyword=function(t){if(M.test(t))this.word+=t;else{if("["===t){var i=[];return i.push(this.word),this.level++,null===this.root?this.root=i:this.currentObject.push(i),this.stack.push(this.currentObject),this.currentObject=i,void(this.state=1)}if(!x.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},S.prototype.neutral=function(t){if(w.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(k.test(t))return this.word=t,void(this.state=3);if(!x.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},S.prototype.output=function(){for(;this.place0?90:-90),t.lat_ts=t.lat1)}(r),r}function O(t){var i=this;if(2===arguments.length){var e=arguments[1];"string"==typeof e?"+"===e.charAt(0)?O[t]=y(arguments[1]):O[t]=A(arguments[1]):O[t]=e}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){Array.isArray(t)?O.apply(i,t):O(t)}));if("string"==typeof t){if(t in O)return O[t]}else"EPSG"in t?O["EPSG:"+t.EPSG]=t:"ESRI"in t?O["ESRI:"+t.ESRI]=t:"IAU2000"in t?O["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(O);var j=O;var C=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];var I=["3857","900913","3785","102113"];var R=function(t){if(!function(t){return"string"==typeof t}(t))return t;if(function(t){return t in j}(t))return j[t];if(function(t){return C.some((function(i){return t.indexOf(i)>-1}))}(t)){var i=A(t);if(function(t){var i=m(t,"authority");if(i){var e=m(i,"epsg");return e&&I.indexOf(e)>-1}}(i))return j["EPSG:3857"];var e=function(t){var i=m(t,"extension");if(i)return m(i,"proj4")}(i);return e?y(e):i}return function(t){return"+"===t[0]}(t)?y(t):void 0};function P(t,i){var e,n;if(t=t||{},!i)return t;for(n in i)void 0!==(e=i[n])&&(t[n]=e);return t}function N(t,i,e){var n=t*i;return e/Math.sqrt(1-n*n)}function D(t){return t<0?-1:1}function L(t){return Math.abs(t)<=l?t:t-D(t)*c}function F(t,i,e){var n=t*e,r=.5*t;return n=Math.pow((1-n)/(1+n),r),Math.tan(.5*(o-i))/n}function z(t,i){for(var e,n,r=.5*t,s=o-2*Math.atan(i),a=0;a<=15;a++)if(e=t*Math.sin(s),s+=n=o-2*Math.atan(i*Math.pow((1-e)/(1+e),r))-s,Math.abs(n)<=1e-10)return s;return-9999}function U(t){return t}var G=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=N(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var i,e,n=t.x,r=t.y;if(r*h>90&&r*h<-90&&n*h>180&&n*h<-180)return null;if(Math.abs(Math.abs(r)-o)<=a)return null;if(this.sphere)i=this.x0+this.a*this.k0*L(n-this.long0),e=this.y0+this.a*this.k0*Math.log(Math.tan(f+.5*r));else{var s=Math.sin(r),u=F(this.e,r,s);i=this.x0+this.a*this.k0*L(n-this.long0),e=this.y0-this.a*this.k0*Math.log(u)}return t.x=i,t.y=e,t},inverse:function(t){var i,e,n=t.x-this.x0,r=t.y-this.y0;if(this.sphere)e=o-2*Math.atan(Math.exp(-r/(this.a*this.k0)));else{var s=Math.exp(-r/(this.a*this.k0));if(-9999===(e=z(this.e,s)))return null}return i=L(this.long0+n/(this.a*this.k0)),t.x=i,t.y=e,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:U,inverse:U,names:["longlat","identity"]}],B={},q=[];function V(t,i){var e=q.length;return t.names?(q[e]=t,t.names.forEach((function(t){B[t.toLowerCase()]=e})),this):(console.log(i),!0)}var Z={start:function(){G.forEach(V)},add:V,get:function(t){if(!t)return!1;var i=t.toLowerCase();return void 0!==B[i]&&q[B[i]]?q[B[i]]:void 0}},$={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},W=$.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};$.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var H={};H.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},H.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},H.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},H.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},H.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},H.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},H.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},H.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},H.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},H.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},H.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},H.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},H.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},H.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},H.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},H.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},H.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};var K=function(t,i,e,n,r,o,a){var u={};return u.datum_type=void 0===t||"none"===t?5:4,i&&(u.datum_params=i.map(parseFloat),0===u.datum_params[0]&&0===u.datum_params[1]&&0===u.datum_params[2]||(u.datum_type=1),u.datum_params.length>3&&(0===u.datum_params[3]&&0===u.datum_params[4]&&0===u.datum_params[5]&&0===u.datum_params[6]||(u.datum_type=2,u.datum_params[3]*=s,u.datum_params[4]*=s,u.datum_params[5]*=s,u.datum_params[6]=u.datum_params[6]/1e6+1))),a&&(u.datum_type=3,u.grids=a),u.a=e,u.b=n,u.es=r,u.ep2=o,u},Y={};function X(t){if(0===t.length)return null;var i="@"===t[0];return i&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!i,grid:null,isNull:!0}:{name:t,mandatory:!i,grid:Y[t]||null,isNull:!1}}function J(t){return t/3600*Math.PI/180}function Q(t,i,e){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,e)))}function tt(t){return t.map((function(t){return[J(t.longitudeShift),J(t.latitudeShift)]}))}function it(t,i,e){return{name:Q(t,i+8,i+16).trim(),parent:Q(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,e),upperLatitude:t.getFloat64(i+88,e),lowerLongitude:t.getFloat64(i+104,e),upperLongitude:t.getFloat64(i+120,e),latitudeInterval:t.getFloat64(i+136,e),longitudeInterval:t.getFloat64(i+152,e),gridNodeCount:t.getInt32(i+168,e)}}function et(t,i,e,n){for(var r=i+176,s=[],o=0;o-1.001*o)h=-o;else if(h>o&&h<1.001*o)h=o;else{if(h<-o)return{x:-1/0,y:-1/0,z:t.z};if(h>o)return{x:1/0,y:1/0,z:t.z}}return u>Math.PI&&(u-=2*Math.PI),r=Math.sin(h),a=Math.cos(h),s=r*r,{x:((n=e/Math.sqrt(1-i*s))+f)*a*Math.cos(u),y:(n+f)*a*Math.sin(u),z:(n*(1-i)+f)*r}}function ot(t,i,e,n){var r,s,a,u,h,f,c,l,d,v,p,m,y,g,b,w=1e-12,M=t.x,x=t.y,k=t.z?t.z:0;if(r=Math.sqrt(M*M+x*x),s=Math.sqrt(M*M+x*x+k*k),r/e1e-24&&y<30);return{x:g,y:Math.atan(p/Math.abs(v)),z:b}}function at(t){return 1===t||2===t}function ut(t,i,e){if(function(t,i){return t.datum_type===i.datum_type&&!(t.a!==i.a||Math.abs(t.es-i.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]:2!==t.datum_type||t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6])}(t,i))return e;if(5===t.datum_type||5===i.datum_type)return e;var s=t.a,o=t.es;if(3===t.datum_type){if(0!==ht(t,!1,e))return;s=n,o=r}var a=i.a,u=i.b,h=i.es;if(3===i.datum_type&&(a=n,u=6356752.314,h=r),o===h&&s===a&&!at(t.datum_type)&&!at(i.datum_type))return e;if((e=st(e,o,s),at(t.datum_type)&&(e=function(t,i,e){if(1===i)return{x:t.x+e[0],y:t.y+e[1],z:t.z+e[2]};if(2===i){var n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],u=e[5],h=e[6];return{x:h*(t.x-u*t.y+a*t.z)+n,y:h*(u*t.x+t.y-o*t.z)+r,z:h*(-a*t.x+o*t.y+t.z)+s}}}(e,t.datum_type,t.datum_params)),at(i.datum_type)&&(e=function(t,i,e){if(1===i)return{x:t.x-e[0],y:t.y-e[1],z:t.z-e[2]};if(2===i){var n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],u=e[5],h=e[6],f=(t.x-n)/h,c=(t.y-r)/h,l=(t.z-s)/h;return{x:f+u*c-a*l,y:-u*f+c+o*l,z:a*f-o*c+l}}}(e,i.datum_type,i.datum_params)),e=ot(e,h,a,u),3===i.datum_type)&&0!==ht(i,!0,e))return;return e}function ht(t,i,e){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var n={x:-e.x,y:e.y},r={x:Number.NaN,y:Number.NaN},s=[],o=0;on.y||c>n.x||v1e-12&&Math.abs(o.y)>1e-12);if(u<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=L(s.x+e.ll[0]),n.y=s.y+e.ll[1]}else isNaN(s.x)||(n.x=t.x+s.x,n.y=t.y+s.y);return n}function ct(t,i){var e,n={x:t.x/i.del[0],y:t.y/i.del[1]},r=Math.floor(n.x),s=Math.floor(n.y),o=n.x-1*r,a=n.y-1*s,u={x:Number.NaN,y:Number.NaN};if(r<0||r>=i.lim[0])return u;if(s<0||s>=i.lim[1])return u;e=s*i.lim[0]+r;var h=i.cvs[e][0],f=i.cvs[e][1];e++;var c=i.cvs[e][0],l=i.cvs[e][1];e+=i.lim[0];var d=i.cvs[e][0],v=i.cvs[e][1];e--;var p=i.cvs[e][0],m=i.cvs[e][1],y=o*a,g=o*(1-a),b=(1-o)*(1-a),w=(1-o)*a;return u.x=b*h+g*c+w*p+y*d,u.y=b*f+g*l+w*m+y*v,u}function lt(t,i,e){var n,r,s,o=e.x,a=e.y,u=e.z||0,h={};for(s=0;s<3;s++)if(!i||2!==s||void 0!==e.z)switch(0===s?(n=o,r=-1!=="ew".indexOf(t.axis[s])?"x":"y"):1===s?(n=a,r=-1!=="ns".indexOf(t.axis[s])?"y":"x"):(n=u,r="z"),t.axis[s]){case"e":h[r]=n;break;case"w":h[r]=-n;break;case"n":h[r]=n;break;case"s":h[r]=-n;break;case"u":void 0!==e[r]&&(h.z=n);break;case"d":void 0!==e[r]&&(h.z=-n);break;default:return null}return h}function dt(t){var i={x:t[0],y:t[1]};return t.length>2&&(i.z=t[2]),t.length>3&&(i.m=t[3]),i}function vt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function pt(t,i,e,n){var r;if(Array.isArray(e)&&(e=dt(e)),function(t){vt(t.x),vt(t.y)}(e),t.datum&&i.datum&&function(t,i){return(1===t.datum.datum_type||2===t.datum.datum_type)&&"WGS84"!==i.datumCode||(1===i.datum.datum_type||2===i.datum.datum_type)&&"WGS84"!==t.datumCode}(t,i)&&(e=pt(t,r=new rt("WGS84"),e,n),t=r),n&&"enu"!==t.axis&&(e=lt(t,!1,e)),"longlat"===t.projName)e={x:e.x*u,y:e.y*u,z:e.z||0};else if(t.to_meter&&(e={x:e.x*t.to_meter,y:e.y*t.to_meter,z:e.z||0}),!(e=t.inverse(e)))return;if(t.from_greenwich&&(e.x+=t.from_greenwich),e=ut(t.datum,i.datum,e))return i.from_greenwich&&(e={x:e.x-i.from_greenwich,y:e.y,z:e.z||0}),"longlat"===i.projName?e={x:e.x*h,y:e.y*h,z:e.z||0}:(e=i.forward(e),i.to_meter&&(e={x:e.x/i.to_meter,y:e.y/i.to_meter,z:e.z||0})),n&&"enu"!==i.axis?lt(i,!0,e):e}var mt=rt("WGS84");function yt(t,i,e,n){var r,s,o;return Array.isArray(e)?(r=pt(t,i,e,n)||{x:NaN,y:NaN},e.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name?"number"==typeof r.z?[r.x,r.y,r.z].concat(e.splice(3)):[r.x,r.y,e[2]].concat(e.splice(3)):[r.x,r.y].concat(e.splice(2)):[r.x,r.y]):(s=pt(t,i,e,n),2===(o=Object.keys(e)).length||o.forEach((function(n){if(void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name){if("x"===n||"y"===n||"z"===n)return}else if("x"===n||"y"===n)return;s[n]=e[n]})),s)}function gt(t){return t instanceof rt?t:t.oProj?t.oProj:rt(t)}var bt=function(t,i,e){t=gt(t);var n,r=!1;return void 0===i?(i=t,t=mt,r=!0):(void 0!==i.x||Array.isArray(i))&&(e=i,i=t,t=mt,r=!0),i=gt(i),e?yt(t,i,e):(n={forward:function(e,n){return yt(t,i,e,n)},inverse:function(e,n){return yt(i,t,e,n)}},r&&(n.oProj=i),n)},wt="AJSAJS",Mt="AFAFAF",xt=65,kt=73,St=79,Et=86,Tt=90,_t={forward:At,inverse:function(t){var i=It(Nt(t.toUpperCase()));if(i.lat&&i.lon)return[i.lon,i.lat,i.lon,i.lat];return[i.left,i.bottom,i.right,i.top]},toPoint:Ot};function At(t,i){return i=i||5,function(t,i){var e="00000"+t.easting,n="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(d=t.easting,v=t.northing,p=t.zoneNumber,m=Pt(p),y=Math.floor(d/1e5),g=Math.floor(v/1e5)%20,r=y,s=g,o=m,a=o-1,u=wt.charCodeAt(a),h=Mt.charCodeAt(a),f=u+r-1,c=h+s,l=!1,f>Tt&&(f=f-Tt+xt-1,l=!0),(f===kt||ukt||(f>kt||uSt||(f>St||uTt&&(f=f-Tt+xt-1),c>Et?(c=c-Et+xt-1,l=!0):l=!1,(c===kt||hkt||(c>kt||hSt||(c>St||hEt&&(c=c-Et+xt-1),String.fromCharCode(f)+String.fromCharCode(c))+e.substr(e.length-5,i)+n.substr(n.length-5,i);var r,s,o,a,u,h,f,c,l;var d,v,p,m,y,g}(function(t){var i,e,n,r,s,o,a,u,h=t.lat,f=t.lon,c=6378137,l=.00669438,d=.9996,v=jt(h),p=jt(f);u=Math.floor((f+180)/6)+1,180===f&&(u=60);h>=56&&h<64&&f>=3&&f<12&&(u=32);h>=72&&h<84&&(f>=0&&f<9?u=31:f>=9&&f<21?u=33:f>=21&&f<33?u=35:f>=33&&f<42&&(u=37));a=jt(6*(u-1)-180+3),i=l/(1-l),e=c/Math.sqrt(1-l*Math.sin(v)*Math.sin(v)),n=Math.tan(v)*Math.tan(v),r=i*Math.cos(v)*Math.cos(v),s=Math.cos(v)*(p-a),o=c*((1-l/4-3*l*l/64-5*l*l*l/256)*v-(3*l/8+3*l*l/32+45*l*l*l/1024)*Math.sin(2*v)+(15*l*l/256+45*l*l*l/1024)*Math.sin(4*v)-35*l*l*l/3072*Math.sin(6*v));var m=d*e*(s+(1-n+r)*s*s*s/6+(5-18*n+n*n+72*r-58*i)*s*s*s*s*s/120)+5e5,y=d*(o+e*Math.tan(v)*(s*s/2+(5-n+9*r+4*r*r)*s*s*s*s/24+(61-58*n+n*n+600*r-330*i)*s*s*s*s*s*s/720));h<0&&(y+=1e7);return{northing:Math.round(y),easting:Math.round(m),zoneNumber:u,zoneLetter:Rt(h)}}({lat:t[1],lon:t[0]}),i)}function Ot(t){var i=It(Nt(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat]:[(i.left+i.right)/2,(i.top+i.bottom)/2]}function jt(t){return t*(Math.PI/180)}function Ct(t){return t/Math.PI*180}function It(t){var i=t.northing,e=t.easting,n=t.zoneLetter,r=t.zoneNumber;if(r<0||r>60)return null;var s,o,a,u,h,f,c,l,d,v=.9996,p=6378137,m=.00669438,y=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),g=e-5e5,b=i;n<"N"&&(b-=1e7),c=6*(r-1)-180+3,s=.006739496752268451,d=(l=b/v/6367449.145945056)+(3*y/2-27*y*y*y/32)*Math.sin(2*l)+(21*y*y/16-55*y*y*y*y/32)*Math.sin(4*l)+151*y*y*y/96*Math.sin(6*l),o=p/Math.sqrt(1-m*Math.sin(d)*Math.sin(d)),a=Math.tan(d)*Math.tan(d),u=s*Math.cos(d)*Math.cos(d),h=.99330562*p/Math.pow(1-m*Math.sin(d)*Math.sin(d),1.5),f=g/(o*v);var w=d-o*Math.tan(d)/h*(f*f/2-(5+3*a+10*u-4*u*u-9*s)*f*f*f*f/24+(61+90*a+298*u+45*a*a-1.6983531815716497-3*u*u)*f*f*f*f*f*f/720);w=Ct(w);var M,x=(f-(1+2*a+u)*f*f*f/6+(5-2*u+28*a-3*u*u+8*s+24*a*a)*f*f*f*f*f/120)/Math.cos(d);if(x=c+Ct(x),t.accuracy){var k=It({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});M={top:k.lat,right:k.lon,bottom:w,left:x}}else M={lat:w,lon:x};return M}function Rt(t){var i="Z";return 84>=t&&t>=72?i="X":72>t&&t>=64?i="W":64>t&&t>=56?i="V":56>t&&t>=48?i="U":48>t&&t>=40?i="T":40>t&&t>=32?i="S":32>t&&t>=24?i="R":24>t&&t>=16?i="Q":16>t&&t>=8?i="P":8>t&&t>=0?i="N":0>t&&t>=-8?i="M":-8>t&&t>=-16?i="L":-16>t&&t>=-24?i="K":-24>t&&t>=-32?i="J":-32>t&&t>=-40?i="H":-40>t&&t>=-48?i="G":-48>t&&t>=-56?i="F":-56>t&&t>=-64?i="E":-64>t&&t>=-72?i="D":-72>t&&t>=-80&&(i="C"),i}function Pt(t){var i=t%6;return 0===i&&(i=6),i}function Nt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var i,e=t.length,n=null,r="",s=0;!/[A-Z]/.test(i=t.charAt(s));){if(s>=2)throw"MGRSPoint bad conversion from: "+t;r+=i,s++}var o=parseInt(r,10);if(0===s||s+3>e)throw"MGRSPoint bad conversion from: "+t;var a=t.charAt(s++);if(a<="A"||"B"===a||"Y"===a||a>="Z"||"I"===a||"O"===a)throw"MGRSPoint zone letter "+a+" not handled: "+t;n=t.substring(s,s+=2);for(var u=Pt(o),h=function(t,i){var e=wt.charCodeAt(i-1),n=1e5,r=!1;for(;e!==t.charCodeAt(0);){if(++e===kt&&e++,e===St&&e++,e>Tt){if(r)throw"Bad character: "+t;e=xt,r=!0}n+=1e5}return n}(n.charAt(0),u),f=function(t,i){if(t>"V")throw"MGRSPoint given invalid Northing "+t;var e=Mt.charCodeAt(i-1),n=0,r=!1;for(;e!==t.charCodeAt(0);){if(++e===kt&&e++,e===St&&e++,e>Et){if(r)throw"Bad character: "+t;e=xt,r=!0}n+=1e5}return n}(n.charAt(1),u);f0&&(l=1e5/Math.pow(10,p),d=t.substring(s,s+p),m=parseFloat(d)*l,v=t.substring(s+p),y=parseFloat(v)*l),{easting:m+h,northing:y+f,zoneLetter:a,zoneNumber:o,accuracy:l}}function Dt(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0)return i;throw"Invalid zone letter: "+t}function Lt(t,i,e){if(!(this instanceof Lt))return new Lt(t,i,e);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===i){var n=t.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=t,this.y=i,this.z=e||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Lt.fromMGRS=function(t){return new Lt(Ot(t))},Lt.prototype.toMGRS=function(t){return At([this.x,this.y],t)};var Ft=Lt,zt=.046875,Ut=.01953125,Gt=.01068115234375;function Bt(t){var i=[];i[0]=1-t*(.25+t*(zt+t*(Ut+t*Gt))),i[1]=t*(.75-t*(zt+t*(Ut+t*Gt)));var e=t*t;return i[2]=e*(.46875-t*(.013020833333333334+.007120768229166667*t)),e*=t,i[3]=e*(.3645833333333333-.005696614583333333*t),i[4]=e*t*.3076171875,i}function qt(t,i,e,n){return e*=i,i*=i,n[0]*t-e*(n[1]+i*(n[2]+i*(n[3]+i*n[4])))}function Vt(t,i,e){for(var n=1/(1-i),r=t,s=20;s;--s){var o=Math.sin(r),u=1-i*o*o;if(r-=u=(qt(r,o,Math.cos(r),e)-t)*(u*Math.sqrt(u))*n,Math.abs(u)a?Math.tan(s):0,p=Math.pow(v,2),m=Math.pow(p,2);i=1-this.es*Math.pow(u,2),f/=Math.sqrt(i);var y=qt(s,u,h,this.en);e=this.a*(this.k0*f*(1+c/6*(1-p+l+c/20*(5-18*p+m+14*l-58*p*l+c/42*(61+179*m-m*p-479*p)))))+this.x0,n=this.a*(this.k0*(y-this.ml0+u*o*f/2*(1+c/12*(5-p+9*l+4*d+c/30*(61+m-58*p+270*l-330*p*l+c/56*(1385+543*m-m*p-3111*p))))))+this.y0}else{var g=h*Math.sin(o);if(Math.abs(Math.abs(g)-1)=1){if(g-1>a)return 93;n=0}else n=Math.acos(n);s<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=e,t.y=n,t},inverse:function(t){var i,e,n,r,s=(t.x-this.x0)*(1/this.a),u=(t.y-this.y0)*(1/this.a);if(this.es)if(e=Vt(i=this.ml0+u/this.k0,this.es,this.en),Math.abs(e)a?Math.tan(e):0,l=this.ep2*Math.pow(f,2),d=Math.pow(l,2),v=Math.pow(c,2),p=Math.pow(v,2);i=1-this.es*Math.pow(h,2);var m=s*Math.sqrt(i)/this.k0,y=Math.pow(m,2);n=e-(i*=c)*y/(1-this.es)*.5*(1-y/12*(5+3*v-9*l*v+l-4*d-y/30*(61+90*v-252*l*v+45*p+46*l-y/56*(1385+3633*v+4095*p+1574*p*v)))),r=L(this.long0+m*(1-y/6*(1+2*v+l-y/20*(5+28*v+24*p+8*l*v+6*l-y/42*(61+662*v+1320*p+720*p*v))))/f)}else n=o*D(u),r=0;else{var g=Math.exp(s/this.k0),b=.5*(g-1/g),w=this.lat0+u/this.k0,M=Math.cos(w);i=Math.sqrt((1-Math.pow(M,2))/(1+Math.pow(b,2))),n=Math.asin(i),u<0&&(n=-n),r=0===b&&0===M?0:L(Math.atan2(b,M)+this.long0)}return t.x=r,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function $t(t){var i=Math.exp(t);return i=(i-1/i)/2}function Wt(t,i){t=Math.abs(t),i=Math.abs(i);var e=Math.max(t,i),n=Math.min(t,i)/(e||1);return e*Math.sqrt(1+Math.pow(n,2))}function Ht(t){var i=Math.abs(t);return i=function(t){var i=1+t,e=i-1;return 0===e?t:t*Math.log(i)/e}(i*(1+i/(Wt(1,i)+1))),t<0?-i:i}function Kt(t,i){for(var e,n=2*Math.cos(2*i),r=t.length-1,s=t[r],o=0;--r>=0;)e=n*s-o+t[r],o=s,s=e;return i+e*Math.sin(2*i)}function Yt(t,i,e){for(var n,r,s=Math.sin(i),o=Math.cos(i),a=$t(e),u=function(t){var i=Math.exp(t);return(i+1/i)/2}(e),h=2*o*u,f=-2*s*a,c=t.length-1,l=t[c],d=0,v=0,p=0;--c>=0;)n=v,r=d,l=h*(v=l)-n-f*(d=p)+t[c],p=f*v-r+h*d;return[(h=s*u)*l-(f=o*a)*p,h*p+f*l]}var Xt={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Zt.init.apply(this),this.forward=Zt.forward,this.inverse=Zt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),i=t/(2-t),e=i;this.cgb[0]=i*(2+i*(-2/3+i*(i*(116/45+i*(26/45+i*(-2854/675)))-2))),this.cbg[0]=i*(i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725)))))-2),e*=i,this.cgb[1]=e*(7/3+i*(i*(-227/45+i*(2704/315+i*(2323/945)))-1.6)),this.cbg[1]=e*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945))))),e*=i,this.cgb[2]=e*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835)))),this.cbg[2]=e*(-26/15+i*(34/21+i*(1.6+i*(-12686/2835)))),e*=i,this.cgb[3]=e*(4279/630+i*(-332/35+i*(-399572/14175))),this.cbg[3]=e*(1237/630+i*(i*(-24832/14175)-2.4)),e*=i,this.cgb[4]=e*(4174/315+i*(-144838/6237)),this.cbg[4]=e*(-734/315+i*(109598/31185)),e*=i,this.cgb[5]=e*(601676/22275),this.cbg[5]=e*(444337/155925),e=Math.pow(i,2),this.Qn=this.k0/(1+i)*(1+e*(1/4+e*(1/64+e/256))),this.utg[0]=i*(i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800)))))-.5),this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800)))))),this.utg[1]=e*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720))))),this.gtu[1]=e*(13/48+i*(i*(557/1440+i*(281/630+i*(-1983433/1935360)))-.6)),e*=i,this.utg[2]=e*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720)))),this.gtu[2]=e*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440)))),e*=i,this.utg[3]=e*(-4397/161280+i*(11/504+i*(830251/7257600))),this.gtu[3]=e*(49561/161280+i*(-179/168+i*(6601661/7257600))),e*=i,this.utg[4]=e*(-4583/161280+i*(108847/3991680)),this.gtu[4]=e*(34729/80640+i*(-3418889/1995840)),e*=i,this.utg[5]=e*(-20648693/638668800),this.gtu[5]=.6650675310896665*e;var n=Kt(this.cbg,this.lat0);this.Zb=-this.Qn*(n+function(t,i){for(var e,n=2*Math.cos(i),r=t.length-1,s=t[r],o=0;--r>=0;)e=n*s-o+t[r],o=s,s=e;return Math.sin(i)*e}(this.gtu,2*n))},forward:function(t){var i=L(t.x-this.long0),e=t.y;e=Kt(this.cbg,e);var n=Math.sin(e),r=Math.cos(e),s=Math.sin(i),o=Math.cos(i);e=Math.atan2(n,o*r),i=Math.atan2(s*r,Wt(n,r*o)),i=Ht(Math.tan(i));var a,u,h=Yt(this.gtu,2*e,2*i);return e+=h[0],i+=h[1],Math.abs(i)<=2.623395162778?(a=this.a*(this.Qn*i)+this.x0,u=this.a*(this.Qn*e+this.Zb)+this.y0):(a=1/0,u=1/0),t.x=a,t.y=u,t},inverse:function(t){var i,e,n=(t.x-this.x0)*(1/this.a),r=(t.y-this.y0)*(1/this.a);if(r=(r-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var s=Yt(this.utg,2*r,2*n);r+=s[0],n+=s[1],n=Math.atan($t(n));var o=Math.sin(r),a=Math.cos(r),u=Math.sin(n),h=Math.cos(n);r=Math.atan2(o*h,Wt(u,h*a)),i=L((n=Math.atan2(u,h*a))+this.long0),e=Kt(this.cgb,r)}else i=1/0,e=1/0;return t.x=i,t.y=e,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]};var Jt={init:function(){var t=function(t,i){if(void 0===t){if((t=Math.floor(30*(L(i)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*u,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Xt.init.apply(this),this.forward=Xt.forward,this.inverse=Xt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function Qt(t,i){return Math.pow((1-t)/(1+t),i)}var ti={init:function(){var t=Math.sin(this.lat0),i=Math.cos(this.lat0);i*=i,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*i*i/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+f)/(Math.pow(Math.tan(.5*this.lat0+f),this.C)*Qt(this.e*t,this.ratexp))},forward:function(t){var i=t.x,e=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*e+f),this.C)*Qt(this.e*Math.sin(e),this.ratexp))-o,t.x=this.C*i,t},inverse:function(t){for(var i=t.x/this.C,e=t.y,n=Math.pow(Math.tan(.5*e+f)/this.K,1/this.C),r=20;r>0&&(e=2*Math.atan(n*Qt(this.e*Math.sin(t.y),-.5*this.e))-o,!(Math.abs(e-t.y)<1e-14));--r)t.y=e;return r?(t.x=i,t.y=e,t):null},names:["gauss"]};var ii={init:function(){ti.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var i,e,n,r;return t.x=L(t.x-this.long0),ti.forward.apply(this,[t]),i=Math.sin(t.y),e=Math.cos(t.y),n=Math.cos(t.x),r=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*e*n),t.x=r*e*Math.sin(t.x),t.y=r*(this.cosc0*i-this.sinc0*e*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var i,e,n,r,s;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,s=Math.sqrt(t.x*t.x+t.y*t.y)){var o=2*Math.atan2(s,this.R2);i=Math.sin(o),e=Math.cos(o),r=Math.asin(e*this.sinc0+t.y*i*this.cosc0/s),n=Math.atan2(t.x*i,s*this.cosc0*e-t.y*this.sinc0*i)}else r=this.phic0,n=0;return t.x=n,t.y=r,ti.inverse.apply(this,[t]),t.x=L(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};var ei={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=a&&(this.k0=.5*(1+D(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=a&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=a&&(this.k0=.5*this.cons*N(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/F(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=N(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.M(this.lat0,this.sinlat0,this.e))-o,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var i,e,n,r,s,u,h=t.x,f=t.y,c=Math.sin(f),l=Math.cos(f),d=L(h-this.long0);return Math.abs(Math.abs(h-this.long0)-Math.PI)<=a&&Math.abs(f+this.lat0)<=a?(t.x=NaN,t.y=NaN,t):this.sphere?(i=2*this.k0/(1+this.sinlat0*c+this.coslat0*l*Math.cos(d)),t.x=this.a*i*l*Math.sin(d)+this.x0,t.y=this.a*i*(this.coslat0*c-this.sinlat0*l*Math.cos(d))+this.y0,t):(e=2*Math.atan(this.M(f,c,this.e))-o,r=Math.cos(e),n=Math.sin(e),Math.abs(this.coslat0)<=a?(s=F(this.e,f*this.con,this.con*c),u=2*this.a*this.k0*s/this.cons,t.x=this.x0+u*Math.sin(h-this.long0),t.y=this.y0-this.con*u*Math.cos(h-this.long0),t):(Math.abs(this.sinlat0)0?L(this.long0+Math.atan2(t.x,-1*t.y)):L(this.long0+Math.atan2(t.x,t.y)):L(this.long0+Math.atan2(t.x*Math.sin(h),u*this.coslat0*Math.cos(h)-t.y*this.sinlat0*Math.sin(h))),t.x=i,t.y=e,t)}if(Math.abs(this.coslat0)<=a){if(u<=a)return e=this.lat0,i=this.long0,t.x=i,t.y=e,t;t.x*=this.con,t.y*=this.con,n=u*this.cons/(2*this.a*this.k0),e=this.con*z(this.e,n),i=this.con*L(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else r=2*Math.atan(u*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,u<=a?s=this.X0:(s=Math.asin(Math.cos(r)*this.sinX0+t.y*Math.sin(r)*this.cosX0/u),i=L(this.long0+Math.atan2(t.x*Math.sin(r),u*this.cosX0*Math.cos(r)-t.y*this.sinX0*Math.sin(r)))),e=-1*z(this.e,Math.tan(.5*(o+s)));return t.x=i,t.y=e,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],M:function(t,i,e){return i*=e,Math.tan(.5*(o+t))*Math.pow((1-i)/(1+i),.5*e)}};var ni={init:function(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t),e=this.a,n=1/this.rf,r=2*n-Math.pow(n,2),s=this.e=Math.sqrt(r);this.R=this.k0*e*Math.sqrt(1-r)/(1-r*Math.pow(i,2)),this.alpha=Math.sqrt(1+r/(1-r)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(i/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),a=Math.log(Math.tan(Math.PI/4+t/2)),u=Math.log((1+s*i)/(1-s*i));this.K=o-this.alpha*a+this.alpha*s/2*u},forward:function(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2)),e=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(i+e)+this.K,r=2*(Math.atan(Math.exp(n))-Math.PI/4),s=this.alpha*(t.x-this.lambda0),o=Math.atan(Math.sin(s)/(Math.sin(this.b0)*Math.tan(r)+Math.cos(this.b0)*Math.cos(s))),a=Math.asin(Math.cos(this.b0)*Math.sin(r)-Math.sin(this.b0)*Math.cos(r)*Math.cos(s));return t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,t.x=this.R*o+this.x0,t},inverse:function(t){for(var i=t.x-this.x0,e=t.y-this.y0,n=i/this.R,r=2*(Math.atan(Math.exp(e/this.R))-Math.PI/4),s=Math.asin(Math.cos(this.b0)*Math.sin(r)+Math.sin(this.b0)*Math.cos(r)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(r))),a=this.lambda0+o/this.alpha,u=0,h=s,f=-1e3,c=0;Math.abs(h-f)>1e-7;){if(++c>20)return;u=1/this.alpha*(Math.log(Math.tan(Math.PI/4+s/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(h))/2)),f=h,h=2*Math.atan(Math.exp(u))-Math.PI/2}return t.x=a,t.y=h,t},names:["somerc"]},ri=1e-7;var si={init:function(){var t,i,e,n,r,s,h,l,d,v,p,m,y,g=0,b=0,w=0,M=0,x=0,k=0,S=0;this.no_off=(y="object"==typeof(m=this).PROJECTION?Object.keys(m.PROJECTION)[0]:m.PROJECTION,"no_uoff"in m||"no_off"in m||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(y)),this.no_rot="no_rot"in this;var E=!1;"alpha"in this&&(E=!0);var T=!1;if("rectified_grid_angle"in this&&(T=!0),E&&(S=this.alpha),T&&(g=this.rectified_grid_angle*u),E||T)b=this.longc;else if(w=this.long1,x=this.lat1,M=this.long2,k=this.lat2,Math.abs(x-k)<=ri||(t=Math.abs(x))<=ri||Math.abs(t-o)<=ri||Math.abs(Math.abs(this.lat0)-o)<=ri||Math.abs(Math.abs(k)-o)<=ri)throw new Error;var _=1-this.es;i=Math.sqrt(_),Math.abs(this.lat0)>a?(l=Math.sin(this.lat0),e=Math.cos(this.lat0),t=1-this.es*l*l,this.B=e*e,this.B=Math.sqrt(1+this.es*this.B*this.B/_),this.A=this.B*this.k0*i/t,(r=(n=this.B*i/(e*Math.sqrt(t)))*n-1)<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=n,this.E*=Math.pow(F(this.e,this.lat0,l),this.B)):(this.B=1/i,this.A=this.k0,this.E=n=r=1),E||T?(E?(p=Math.asin(Math.sin(S)/n),T||(g=S)):(p=g,S=Math.asin(n*Math.sin(p))),this.lam0=b-Math.asin(.5*(r-1/r)*Math.tan(p))/this.B):(s=Math.pow(F(this.e,x,Math.sin(x)),this.B),h=Math.pow(F(this.e,k,Math.sin(k)),this.B),r=this.E/s,d=(h-s)/(h+s),v=((v=this.E*this.E)-h*s)/(v+h*s),(t=w-M)<-Math.pi?M-=c:t>Math.pi&&(M+=c),this.lam0=L(.5*(w+M)-Math.atan(v*Math.tan(.5*this.B*(w-M))/d)/this.B),p=Math.atan(2*Math.sin(this.B*L(w-this.lam0))/(r-1/r)),g=S=Math.asin(n*Math.sin(p))),this.singam=Math.sin(p),this.cosgam=Math.cos(p),this.sinrot=Math.sin(g),this.cosrot=Math.cos(g),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A,this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(S))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*p,this.v_pole_n=this.ArB*Math.log(Math.tan(f-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(f+r))},forward:function(t){var i,e,n,r,s,u,h,f,c={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-o)>a){if(i=.5*((s=this.E/Math.pow(F(this.e,t.y,Math.sin(t.y)),this.B))-(u=1/s)),e=.5*(s+u),r=Math.sin(this.B*t.x),n=(i*this.singam-r*this.cosgam)/e,Math.abs(Math.abs(n)-1)0?this.v_pole_n:this.v_pole_s,h=this.ArB*t.y;return this.no_rot?(c.x=h,c.y=f):(h-=this.u_0,c.x=f*this.cosrot+h*this.sinrot,c.y=h*this.cosrot-f*this.sinrot),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c},inverse:function(t){var i,e,n,r,s,u,h,f={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(e=t.y,i=t.x):(e=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((n=Math.exp(-this.BrA*e))-1/n),s=.5*(n+1/n),h=((u=Math.sin(this.BrA*i))*this.cosgam+r*this.singam)/s,Math.abs(Math.abs(h)-1)a?this.ns=Math.log(n/u)/Math.log(r/h):this.ns=i,isNaN(this.ns)&&(this.ns=i),this.f0=n/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(f,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var i=t.x,e=t.y;Math.abs(2*Math.abs(e)-Math.PI)<=a&&(e=D(e)*(o-2e-10));var n,r,s=Math.abs(Math.abs(e)-o);if(s>a)n=F(this.e,e,Math.sin(e)),r=this.a*this.f0*Math.pow(n,this.ns);else{if((s=e*this.ns)<=0)return null;r=0}var u=this.ns*L(i-this.long0);return t.x=this.k0*(r*Math.sin(u))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(u))+this.y0,t},inverse:function(t){var i,e,n,r,s,a=(t.x-this.x0)/this.k0,u=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(a*a+u*u),e=1):(i=-Math.sqrt(a*a+u*u),e=-1);var h=0;if(0!==i&&(h=Math.atan2(e*a,e*u)),0!==i||this.ns>0){if(e=1/this.ns,n=Math.pow(i/(this.a*this.f0),e),-9999===(r=z(this.e,n)))return null}else r=-o;return s=L(h/this.ns+this.long0),t.x=s,t.y=r,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"]};var ai={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var i,e,n,r,s,o,a,u=t.x,h=t.y,f=L(u-this.long0);return i=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),e=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/i)-this.s45),n=-f*this.alfa,r=Math.asin(Math.cos(this.ad)*Math.sin(e)+Math.sin(this.ad)*Math.cos(e)*Math.cos(n)),s=Math.asin(Math.cos(e)*Math.sin(n)/Math.cos(r)),o=this.n*s,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(r/2+this.s45),this.n),t.y=a*Math.cos(o)/1,t.x=a*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var i,e,n,r,s,o,a,u=t.x;t.x=t.y,t.y=u,this.czech||(t.y*=-1,t.x*=-1),s=Math.sqrt(t.x*t.x+t.y*t.y),r=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),i=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(r)),e=Math.asin(Math.cos(n)*Math.sin(r)/Math.cos(i)),t.x=this.long0-e/this.alfa,o=i,a=0;var h=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(a=1),o=t.y,h+=1}while(0===a&&h<15);return h>=15?null:t},names:["Krovak","krovak"]};function ui(t,i,e,n,r){return t*r-i*Math.sin(2*r)+e*Math.sin(4*r)-n*Math.sin(6*r)}function hi(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function fi(t){return.375*t*(1+.25*t*(1+.46875*t))}function ci(t){return.05859375*t*t*(1+.75*t)}function li(t){return t*t*t*(35/3072)}function di(t,i,e){var n=i*e;return t/Math.sqrt(1-n*n)}function vi(t){return Math.abs(t)1e-7?(1-t*t)*(i/(1-(e=t*i)*e)-.5/t*Math.log((1-e)/(1+e))):2*i}var gi=.3333333333333333,bi=.17222222222222222,wi=.10257936507936508,Mi=.06388888888888888,xi=.0664021164021164,ki=.016415012942191543;var Si={init:function(){var t,i=Math.abs(this.lat0);if(Math.abs(i-o)0)switch(this.qp=yi(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var i,e=[];return e[0]=t*gi,i=t*t,e[0]+=i*bi,e[1]=i*Mi,i*=t,e[0]+=i*wi,e[1]+=i*xi,e[2]=i*ki,e}(this.es),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=yi(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var i,e,n,r,s,u,h,c,l,d,v=t.x,p=t.y;if(v=L(v-this.long0),this.sphere){if(s=Math.sin(p),d=Math.cos(p),n=Math.cos(v),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((e=this.mode===this.EQUIT?1+d*n:1+this.sinph0*s+this.cosph0*d*n)<=a)return null;i=(e=Math.sqrt(2/e))*d*Math.sin(v),e*=this.mode===this.EQUIT?s:this.cosph0*s-this.sinph0*d*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(p+this.lat0)=0?(i=(l=Math.sqrt(u))*r,e=n*(this.mode===this.S_POLE?l:-l)):i=e=0}}return t.x=this.a*i+this.x0,t.y=this.a*e+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,e,n,r,s,u,h,f,c,l,d=t.x/this.a,v=t.y/this.a;if(this.sphere){var p,m=0,y=0;if((e=.5*(p=Math.sqrt(d*d+v*v)))>1)return null;switch(e=2*Math.asin(e),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(y=Math.sin(e),m=Math.cos(e)),this.mode){case this.EQUIT:e=Math.abs(p)<=a?0:Math.asin(v*y/p),d*=y,v=m*p;break;case this.OBLIQ:e=Math.abs(p)<=a?this.lat0:Math.asin(m*this.sinph0+v*y*this.cosph0/p),d*=y*this.cosph0,v=(m-Math.sin(e)*this.sinph0)*p;break;case this.N_POLE:v=-v,e=o-e;break;case this.S_POLE:e-=o}i=0!==v||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(d,v):0}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(d/=this.dd,v*=this.dd,(u=Math.sqrt(d*d+v*v))1&&(t=t>1?1:-1),Math.asin(t)}var Ti={init:function(){Math.abs(this.lat1+this.lat2)a?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var i=t.x,e=t.y;this.sin_phi=Math.sin(e),this.cos_phi=Math.cos(e);var n=yi(this.e3,this.sin_phi,this.cos_phi),r=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,s=this.ns0*L(i-this.long0),o=r*Math.sin(s)+this.x0,a=this.rh-r*Math.cos(s)+this.y0;return t.x=o,t.y=a,t},inverse:function(t){var i,e,n,r,s,o;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),r=0,0!==i&&(r=Math.atan2(n*t.x,n*t.y)),n=i*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(e=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,e)),s=L(r/this.ns0+this.long0),t.x=s,t.y=o,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,i){var e,n,r,s,o=Ei(.5*i);if(t0||Math.abs(s)<=a?(o=this.x0+1*this.a*e*Math.sin(n)/s,u=this.y0+1*this.a*(this.cos_p14*i-this.sin_p14*e*r)/s):(o=this.x0+this.infinity_dist*e*Math.sin(n),u=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*e*r)),t.x=o,t.y=u,t},inverse:function(t){var i,e,n,r,s,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(i=Math.sqrt(t.x*t.x+t.y*t.y))?(r=Math.atan2(i,this.rc),e=Math.sin(r),o=Ei((n=Math.cos(r))*this.sin_p14+t.y*e*this.cos_p14/i),s=Math.atan2(t.x*e,i*this.cos_p14*n-t.y*this.sin_p14*e),s=L(this.long0+s)):(o=this.phic0,s=0),t.x=s,t.y=o,t},names:["gnom"]};var Ai={init:function(){this.sphere||(this.k0=N(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var i,e,n=t.x,r=t.y,s=L(n-this.long0);if(this.sphere)i=this.x0+this.a*s*Math.cos(this.lat_ts),e=this.y0+this.a*Math.sin(r)/Math.cos(this.lat_ts);else{var o=yi(this.e,Math.sin(r));i=this.x0+this.a*this.k0*s,e=this.y0+this.a*o*.5/this.k0}return t.x=i,t.y=e,t},inverse:function(t){var i,e;return t.x-=this.x0,t.y-=this.y0,this.sphere?(i=L(this.long0+t.x/this.a/Math.cos(this.lat_ts)),e=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(e=function(t,i){var e=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-e)<1e-6)return i<0?-1*o:o;for(var n,r,s,a,u=Math.asin(.5*i),h=0;h<30;h++)if(r=Math.sin(u),s=Math.cos(u),a=t*r,u+=n=Math.pow(1-a*a,2)/(2*s)*(i/(1-t*t)-r/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),Math.abs(n)<=1e-10)return u;return NaN}(this.e,2*t.y*this.k0/this.a),i=L(this.long0+t.x/(this.a*this.k0))),t.x=i,t.y=e,t},names:["cea"]};var Oi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var i=t.x,e=t.y,n=L(i-this.long0),r=vi(e-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*r,t},inverse:function(t){var i=t.x,e=t.y;return t.x=L(this.long0+(i-this.x0)/(this.a*this.rc)),t.y=vi(this.lat0+(e-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]};var ji={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=hi(this.es),this.e1=fi(this.es),this.e2=ci(this.es),this.e3=li(this.es),this.ml0=this.a*ui(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var i,e,n,r=t.x,s=t.y,o=L(r-this.long0);if(n=o*Math.sin(s),this.sphere)Math.abs(s)<=a?(i=this.a*o,e=-1*this.a*this.lat0):(i=this.a*Math.sin(n)/Math.tan(s),e=this.a*(vi(s-this.lat0)+(1-Math.cos(n))/Math.tan(s)));else if(Math.abs(s)<=a)i=this.a*o,e=-1*this.ml0;else{var u=di(this.a,this.e,Math.sin(s))/Math.tan(s);i=u*Math.sin(n),e=this.a*ui(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+u*(1-Math.cos(n))}return t.x=i+this.x0,t.y=e+this.y0,t},inverse:function(t){var i,e,n,r,s,o,u,h,f;if(n=t.x-this.x0,r=t.y-this.y0,this.sphere)if(Math.abs(r+this.a*this.lat0)<=a)i=L(n/this.a+this.long0),e=0;else{var c;for(o=this.lat0+r/this.a,u=n*n/this.a/this.a+o*o,h=o,s=20;s;--s)if(h+=f=-1*(o*(h*(c=Math.tan(h))+1)-h-.5*(h*h+u)*c)/((h-o)/c-1),Math.abs(f)<=a){e=h;break}i=L(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(e))}else if(Math.abs(r+this.ml0)<=a)e=0,i=L(this.long0+n/this.a);else{var l,d,v,p,m;for(o=(this.ml0+r)/this.a,u=n*n/this.a/this.a+o*o,h=o,s=20;s;--s)if(m=this.e*Math.sin(h),l=Math.sqrt(1-m*m)*Math.tan(h),d=this.a*ui(this.e0,this.e1,this.e2,this.e3,h),v=this.e0-2*this.e1*Math.cos(2*h)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),h-=f=(o*(l*(p=d/this.a)+1)-p-.5*l*(p*p+u))/(this.es*Math.sin(2*h)*(p*p+u-2*o*p)/(4*l)+(o-p)*(l*v-2/Math.sin(2*h))-v),Math.abs(f)<=a){e=h;break}l=Math.sqrt(1-this.es*Math.pow(Math.sin(e),2))*Math.tan(e),i=L(this.long0+Math.asin(n*l/this.a)/Math.sin(e))}return t.x=i,t.y=e,t},names:["Polyconic","poly"]};var Ci={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var i,e=t.x,n=t.y-this.lat0,r=e-this.long0,o=n/s*1e-5,a=r,u=1,h=0;for(i=1;i<=10;i++)u*=o,h+=this.A[i]*u;var f,c=h,l=a,d=1,v=0,p=0,m=0;for(i=1;i<=6;i++)f=v*c+d*l,d=d*c-v*l,v=f,p=p+this.B_re[i]*d-this.B_im[i]*v,m=m+this.B_im[i]*d+this.B_re[i]*v;return t.x=m*this.a+this.x0,t.y=p*this.a+this.y0,t},inverse:function(t){var i,e,n=t.x,r=t.y,o=n-this.x0,a=(r-this.y0)/this.a,u=o/this.a,h=1,f=0,c=0,l=0;for(i=1;i<=6;i++)e=f*a+h*u,h=h*a-f*u,f=e,c=c+this.C_re[i]*h-this.C_im[i]*f,l=l+this.C_im[i]*h+this.C_re[i]*f;for(var d=0;d.999999999999&&(e=.999999999999),i=Math.asin(e);var n=L(this.long0+t.x/(.900316316158*this.a*Math.cos(i)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),e=(2*i+Math.sin(2*i))/Math.PI,Math.abs(e)>1&&(e=1);var r=Math.asin(e);return t.x=n,t.y=r,t},names:["Mollweide","moll"]};var Ni={init:function(){Math.abs(this.lat1+this.lat2)=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1);var s=0;return 0!==e&&(s=Math.atan2(i*t.x,i*t.y)),this.sphere?(r=L(this.long0+s/this.ns),n=vi(this.g-e/this.a),t.x=r,t.y=n,t):(n=pi(this.g-e/this.a,this.e0,this.e1,this.e2,this.e3),r=L(this.long0+s/this.ns),t.x=r,t.y=n,t)},names:["Equidistant_Conic","eqdc"]};var Di={init:function(){this.R=this.a},forward:function(t){var i,e,n=t.x,r=t.y,s=L(n-this.long0);Math.abs(r)<=a&&(i=this.x0+this.R*s,e=this.y0);var u=Ei(2*Math.abs(r/Math.PI));(Math.abs(s)<=a||Math.abs(Math.abs(r)-o)<=a)&&(i=this.x0,e=r>=0?this.y0+Math.PI*this.R*Math.tan(.5*u):this.y0+Math.PI*this.R*-Math.tan(.5*u));var h=.5*Math.abs(Math.PI/s-s/Math.PI),f=h*h,c=Math.sin(u),l=Math.cos(u),d=l/(c+l-1),v=d*d,p=d*(2/c-1),m=p*p,y=Math.PI*this.R*(h*(d-m)+Math.sqrt(f*(d-m)*(d-m)-(m+f)*(v-m)))/(m+f);s<0&&(y=-y),i=this.x0+y;var g=f+d;return y=Math.PI*this.R*(p*g-h*Math.sqrt((m+f)*(f+1)-g*g))/(m+f),e=r>=0?this.y0+y:this.y0-y,t.x=i,t.y=e,t},inverse:function(t){var i,e,n,r,s,o,u,h,f,c,l,d;return t.x-=this.x0,t.y-=this.y0,l=Math.PI*this.R,s=(n=t.x/l)*n+(r=t.y/l)*r,l=3*(r*r/(h=-2*(o=-Math.abs(r)*(1+s))+1+2*r*r+s*s)+(2*(u=o-2*r*r+n*n)*u*u/h/h/h-9*o*u/h/h)/27)/(f=(o-u*u/3/h)/h)/(c=2*Math.sqrt(-f/3)),Math.abs(l)>1&&(l=l>=0?1:-1),d=Math.acos(l)/3,e=t.y>=0?(-c*Math.cos(d+Math.PI/3)-u/3/h)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-u/3/h)*Math.PI,i=Math.abs(n)2*o*this.a)return;return e=i/this.a,n=Math.sin(e),r=Math.cos(e),s=this.long0,Math.abs(i)<=a?u=this.lat0:(u=Ei(r*this.sin_p12+t.y*n*this.cos_p12/i),h=Math.abs(this.lat0)-o,s=Math.abs(h)<=a?this.lat0>=0?L(this.long0+Math.atan2(t.x,-t.y)):L(this.long0-Math.atan2(-t.x,t.y)):L(this.long0+Math.atan2(t.x*n,i*this.cos_p12*r-t.y*this.sin_p12*n))),t.x=s,t.y=u,t}return f=hi(this.es),c=fi(this.es),l=ci(this.es),d=li(this.es),Math.abs(this.sin_p12-1)<=a?(u=pi(((v=this.a*ui(f,c,l,d,o))-(i=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,f,c,l,d),s=L(this.long0+Math.atan2(t.x,-1*t.y)),t.x=s,t.y=u,t):Math.abs(this.sin_p12+1)<=a?(v=this.a*ui(f,c,l,d,o),u=pi(((i=Math.sqrt(t.x*t.x+t.y*t.y))-v)/this.a,f,c,l,d),s=L(this.long0+Math.atan2(t.x,t.y)),t.x=s,t.y=u,t):(i=Math.sqrt(t.x*t.x+t.y*t.y),y=Math.atan2(t.x,t.y),p=di(this.a,this.e,this.sin_p12),g=Math.cos(y),w=-(b=this.e*this.cos_p12*g)*b/(1-this.es),M=3*this.es*(1-w)*this.sin_p12*this.cos_p12*g/(1-this.es),S=1-w*(k=(x=i/p)-w*(1+w)*Math.pow(x,3)/6-M*(1+3*w)*Math.pow(x,4)/24)*k/2-x*k*k*k/6,m=Math.asin(this.sin_p12*Math.cos(k)+this.cos_p12*Math.sin(k)*g),s=L(this.long0+Math.asin(Math.sin(y)*Math.sin(k)/Math.cos(m))),E=Math.sin(m),u=Math.atan2((E-this.es*S*this.sin_p12)*Math.tan(m),E*(1-this.es)),t.x=s,t.y=u,t)},names:["Azimuthal_Equidistant","aeqd"]};var Fi={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var i,e,n,r,s,o,u,h=t.x,f=t.y;return n=L(h-this.long0),i=Math.sin(f),e=Math.cos(f),r=Math.cos(n),1,((s=this.sin_p14*i+this.cos_p14*e*r)>0||Math.abs(s)<=a)&&(o=1*this.a*e*Math.sin(n),u=this.y0+1*this.a*(this.cos_p14*i-this.sin_p14*e*r)),t.x=o,t.y=u,t},inverse:function(t){var i,e,n,r,s,u,h;return t.x-=this.x0,t.y-=this.y0,e=Ei((i=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(e),r=Math.cos(e),u=this.long0,Math.abs(i)<=a?(h=this.lat0,t.x=u,t.y=h,t):(h=Ei(r*this.sin_p14+t.y*n*this.cos_p14/i),s=Math.abs(this.lat0)-o,Math.abs(s)<=a?(u=this.lat0>=0?L(this.long0+Math.atan2(t.x,-t.y)):L(this.long0-Math.atan2(-t.x,t.y)),t.x=u,t.y=h,t):(u=L(this.long0+Math.atan2(t.x*n,i*this.cos_p14*r-t.y*this.sin_p14*n)),t.x=u,t.y=h,t))},names:["ortho"]},zi=1,Ui=2,Gi=3,Bi=4,qi=5,Vi=6,Zi=1,$i=2,Wi=3,Hi=4;function Ki(t,i,e,n){var r;return tf&&r<=o+f?(n.value=$i,r-=o):r>o+f||r<=-(o+f)?(n.value=Wi,r=r>=0?r-l:r+l):(n.value=Hi,r+=o)),r}function Yi(t,i){var e=t+i;return e<-l?e+=c:e>+l&&(e-=c),e}var Xi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=o-f/2?this.face=qi:this.lat0<=-(o-f/2)?this.face=Vi:Math.abs(this.long0)<=f?this.face=zi:Math.abs(this.long0)<=o+f?this.face=this.long0>0?Ui:Bi:this.face=Gi,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var i,e,n,r,s,a,u={x:0,y:0},h={value:0};if(t.x-=this.long0,i=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,e=t.x,this.face===qi)r=o-i,e>=f&&e<=o+f?(h.value=Zi,n=e-o):e>o+f||e<=-(o+f)?(h.value=$i,n=e>0?e-l:e+l):e>-(o+f)&&e<=-f?(h.value=Wi,n=e+o):(h.value=Hi,n=e);else if(this.face===Vi)r=o+i,e>=f&&e<=o+f?(h.value=Zi,n=-e+o):e=-f?(h.value=$i,n=-e):e<-f&&e>=-(o+f)?(h.value=Wi,n=-e-o):(h.value=Hi,n=e>0?-e+l:-e-l);else{var c,d,v,p,m,y;this.face===Ui?e=Yi(e,+o):this.face===Gi?e=Yi(e,+l):this.face===Bi&&(e=Yi(e,-o)),p=Math.sin(i),m=Math.cos(i),y=Math.sin(e),c=m*Math.cos(e),d=m*y,v=p,this.face===zi?n=Ki(r=Math.acos(c),v,d,h):this.face===Ui?n=Ki(r=Math.acos(d),v,-c,h):this.face===Gi?n=Ki(r=Math.acos(-c),v,-d,h):this.face===Bi?n=Ki(r=Math.acos(-d),v,c,h):(r=n=0,h.value=Zi)}return a=Math.atan(12/l*(n+Math.acos(Math.sin(n)*Math.cos(f))-o)),s=Math.sqrt((1-Math.cos(r))/(Math.cos(a)*Math.cos(a))/(1-Math.cos(Math.atan(1/Math.cos(n))))),h.value===$i?a+=o:h.value===Wi?a+=l:h.value===Hi&&(a+=1.5*l),u.x=s*Math.cos(a),u.y=s*Math.sin(a),u.x=u.x*this.a+this.x0,u.y=u.y*this.a+this.y0,t.x=u.x,t.y=u.y,t},inverse:function(t){var i,e,n,r,s,a,u,h,f,c,d,v,p={lam:0,phi:0},m={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,e=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),i=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?m.value=Zi:t.y>=0&&t.y>=Math.abs(t.x)?(m.value=$i,i-=o):t.x<0&&-t.x>=Math.abs(t.y)?(m.value=Wi,i=i<0?i+l:i-l):(m.value=Hi,i+=o),f=l/12*Math.tan(i),s=Math.sin(f)/(Math.cos(f)-1/Math.sqrt(2)),a=Math.atan(s),(u=1-(n=Math.cos(i))*n*(r=Math.tan(e))*r*(1-Math.cos(Math.atan(1/Math.cos(a)))))<-1?u=-1:u>1&&(u=1),this.face===qi)h=Math.acos(u),p.phi=o-h,m.value===Zi?p.lam=a+o:m.value===$i?p.lam=a<0?a+l:a-l:m.value===Wi?p.lam=a-o:p.lam=a;else if(this.face===Vi)h=Math.acos(u),p.phi=h-o,m.value===Zi?p.lam=-a+o:m.value===$i?p.lam=-a:m.value===Wi?p.lam=-a-o:p.lam=a<0?-a-l:-a+l;else{var y,g,b;f=(y=u)*y,g=(f+=(b=f>=1?0:Math.sqrt(1-f)*Math.sin(a))*b)>=1?0:Math.sqrt(1-f),m.value===$i?(f=g,g=-b,b=f):m.value===Wi?(g=-g,b=-b):m.value===Hi&&(f=g,g=b,b=-f),this.face===Ui?(f=y,y=-g,g=f):this.face===Gi?(y=-y,g=-g):this.face===Bi&&(f=y,y=g,g=-f),p.phi=Math.acos(-b)-o,p.lam=Math.atan2(g,y),this.face===Ui?p.lam=Yi(p.lam,-o):this.face===Gi?p.lam=Yi(p.lam,-l):this.face===Bi&&(p.lam=Yi(p.lam,+o))}return 0!==this.es&&(c=p.phi<0?1:0,d=Math.tan(p.phi),v=this.b/Math.sqrt(d*d+this.one_minus_f_squared),p.phi=Math.atan(Math.sqrt(this.a*this.a-v*v)/(this.one_minus_f*v)),c&&(p.phi=-p.phi)),p.lam+=this.long0,t.x=p.lam,t.y=p.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Ji=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Qi=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],te=.8487,ie=1.3523,ee=h/5,ne=18,re=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))};var se={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var i=L(t.x-this.long0),e=Math.abs(t.y),n=Math.floor(e*ee);n<0?n=0:n>=ne&&(n=17);var r={x:re(Ji[n],e=h*(e-.08726646259971647*n))*i,y:re(Qi[n],e)};return t.y<0&&(r.y=-r.y),r.x=r.x*this.a*te+this.x0,r.y=r.y*this.a*ie+this.y0,r},inverse:function(t){var i={x:(t.x-this.x0)/(this.a*te),y:Math.abs(t.y-this.y0)/(this.a*ie)};if(i.y>=1)i.x/=Ji[18][0],i.y=t.y<0?-o:o;else{var e=Math.floor(i.y*ne);for(e<0?e=0:e>=ne&&(e=17);;)if(Qi[e][0]>i.y)--e;else{if(!(Qi[e+1][0]<=i.y))break;++e}var n=Qi[e],r=5*(i.y-n[0])/(Qi[e+1][0]-n[0]);r=function(t,i,e,n){for(var r=i;n;--n){var s=t(r);if(r-=s,Math.abs(s)1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var s={header:r,subgrids:function(t,i,e){for(var n=176,r=[],s=0;s0&&u>a&&(u=a);for(var h=0;h=0?(f=v.substr(0,p),c=v.substr(p+1)):(f=v,c=""),l=decodeURIComponent(f),d=decodeURIComponent(c),i(s,l)?Array.isArray(s[l])?s[l].push(d):s[l]=[s[l],d]:s[l]=d}return s}},94104:function(t){"use strict";var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,n,r){return e=e||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(r){var s=encodeURIComponent(i(r))+n;return Array.isArray(t[r])?t[r].map((function(t){return s+encodeURIComponent(i(t))})).join(e):s+encodeURIComponent(i(t[r]))})).join(e):r?encodeURIComponent(i(r))+n+encodeURIComponent(i(t)):""}},48966:function(t,i,e){"use strict";i.decode=i.parse=e(39350),i.encode=i.stringify=e(94104)},78476:function(t){t.exports=function(){"use strict";function t(t,n,r,s,o){!function t(e,n,r,s,o){for(;s>r;){if(s-r>600){var a=s-r+1,u=n-r+1,h=Math.log(a),f=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*f*(a-f)/a)*(u-a/2<0?-1:1);t(e,n,Math.max(r,Math.floor(n-u*f/a+c)),Math.min(s,Math.floor(n+(a-u)*f/a+c)),o)}var l=e[n],d=r,v=s;for(i(e,r,n),o(e[s],l)>0&&i(e,r,s);d0;)v--}0===o(e[r],l)?i(e,r,v):i(e,++v,s),v<=n&&(r=v+1),n<=v&&(s=v-1)}}(t,n,r||0,s||t.length-1,o||e)}function i(t,i,e){var n=t[i];t[i]=t[e],t[e]=n}function e(t,i){return ti?1:0}var n=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(t,i,e){if(!e)return i.indexOf(t);for(var n=0;n=t.minX&&i.maxY>=t.minY}function v(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function p(i,e,n,r,s){for(var o=[e,n];o.length;)if(!((n=o.pop())-(e=o.pop())<=r)){var a=e+Math.ceil((n-e)/r/2)*r;t(i,a,e,n,s),o.push(e,a,a,n)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(t){var i=this.data,e=[];if(!d(t,i))return e;for(var n=this.toBBox,r=[];i;){for(var s=0;s=0&&r[i].children.length>this._maxEntries;)this._split(r,i),i--;this._adjustParentBBoxes(n,r,i)},n.prototype._split=function(t,i){var e=t[i],n=e.children.length,r=this._minEntries;this._chooseSplitAxis(e,r,n);var o=this._chooseSplitIndex(e,r,n),a=v(e.children.splice(o,e.children.length-o));a.height=e.height,a.leaf=e.leaf,s(e,this.toBBox),s(a,this.toBBox),i?t[i-1].children.push(a):this._splitRoot(e,a)},n.prototype._splitRoot=function(t,i){this.data=v([t,i]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(t,i,e){for(var n,r,s,a,u,h,c,l=1/0,d=1/0,v=i;v<=e-i;v++){var p=o(t,0,v,this.toBBox),m=o(t,v,e,this.toBBox),y=(r=p,s=m,a=void 0,u=void 0,h=void 0,c=void 0,a=Math.max(r.minX,s.minX),u=Math.max(r.minY,s.minY),h=Math.min(r.maxX,s.maxX),c=Math.min(r.maxY,s.maxY),Math.max(0,h-a)*Math.max(0,c-u)),g=f(p)+f(m);y=i;d--){var v=t.children[d];a(u,t.leaf?r(v):v),h+=c(u)}return h},n.prototype._adjustParentBBoxes=function(t,i,e){for(var n=e;n>=0;n--)a(i[n],t)},n.prototype._condense=function(t){for(var i=t.length-1,e=void 0;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children).splice(e.indexOf(t[i]),1):this.clear():s(t[i],this.toBBox)},n}()},96938:function(t){"use strict";var i={};function e(t,e,n){n||(n=Error);var r=function(t){var i,n;function r(i,n,r){return t.call(this,function(t,i,n){return"string"==typeof e?e:e(t,i,n)}(i,n,r))||this}return n=t,(i=r).prototype=Object.create(n.prototype),i.prototype.constructor=i,i.__proto__=n,r}(n);r.prototype.name=n.name,r.prototype.code=t,i[t]=r}function n(t,i){if(Array.isArray(t)){var e=t.length;return t=t.map((function(t){return String(t)})),e>2?"one of ".concat(i," ").concat(t.slice(0,e-1).join(", "),", or ")+t[e-1]:2===e?"one of ".concat(i," ").concat(t[0]," or ").concat(t[1]):"of ".concat(i," ").concat(t[0])}return"of ".concat(i," ").concat(String(t))}e("ERR_INVALID_OPT_VALUE",(function(t,i){return'The value "'+i+'" is invalid for option "'+t+'"'}),TypeError),e("ERR_INVALID_ARG_TYPE",(function(t,i,e){var r,s,o,a,u;if("string"==typeof i&&function(t,i,e){return t.substr(!e||e<0?0:+e,i.length)===i}(i,"not ")?(r="must not be",i=i.replace(/^not /,"")):r="must be",o=t,a=" argument",(void 0===u||u>o.length)&&(u=o.length),o.substring(u-a.length,u)===a)s="The ".concat(t," ").concat(r," ").concat(n(i,"type"));else{var h=function(t,i,e){return"number"!=typeof e&&(e=0),!(e+i.length>t.length)&&-1!==t.indexOf(i,e)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(h," ").concat(r," ").concat(n(i,"type"))}return s+=". Received type ".concat(typeof e)}),TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=i},24439:function(t,i,e){"use strict";var n=Object.keys||function(t){var i=[];for(var e in t)i.push(e);return i};t.exports=h;var r=e(35327),s=e(54567);e(70087)(h,r);for(var o=n(s.prototype),a=0;a0)if("string"==typeof i||h.objectMode||Object.getPrototypeOf(i)===o.prototype||(i=function(t){return o.from(t)}(i)),n)h.endEmitted?M(t,new w):T(t,h,i,!0);else if(h.ended)M(t,new g);else{if(h.destroyed)return!1;h.reading=!1,h.decoder&&!e?(i=h.decoder.write(i),h.objectMode||0!==i.length?T(t,h,i,!1):C(t,h)):T(t,h,i,!1)}else n||(h.reading=!1,C(t,h));return!h.ended&&(h.lengthi.highWaterMark&&(i.highWaterMark=function(t){return t>=_?t=_:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=i.length?t:i.ended?i.length:(i.needReadable=!0,0))}function O(t){var i=t._readableState;u("emitReadable",i.needReadable,i.emittedReadable),i.needReadable=!1,i.emittedReadable||(u("emitReadable",i.flowing),i.emittedReadable=!0,process.nextTick(j,t))}function j(t){var i=t._readableState;u("emitReadable_",i.destroyed,i.length,i.ended),i.destroyed||!i.length&&!i.ended||(t.emit("readable"),i.emittedReadable=!1),i.needReadable=!i.flowing&&!i.ended&&i.length<=i.highWaterMark,D(t)}function C(t,i){i.readingMore||(i.readingMore=!0,process.nextTick(I,t,i))}function I(t,i){for(;!i.reading&&!i.ended&&(i.length0,i.resumeScheduled&&!i.paused?i.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){u("readable nexttick read 0"),t.read(0)}function N(t,i){u("resume",i.reading),i.reading||t.read(0),i.resumeScheduled=!1,t.emit("resume"),D(t),i.flowing&&!i.reading&&t.read(0)}function D(t){var i=t._readableState;for(u("flow",i.flowing);i.flowing&&null!==t.read(););}function L(t,i){return 0===i.length?null:(i.objectMode?e=i.buffer.shift():!t||t>=i.length?(e=i.decoder?i.buffer.join(""):1===i.buffer.length?i.buffer.first():i.buffer.concat(i.length),i.buffer.clear()):e=i.buffer.consume(t,i.decoder),e);var e}function F(t){var i=t._readableState;u("endReadable",i.endEmitted),i.endEmitted||(i.ended=!0,process.nextTick(z,i,t))}function z(t,i){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,i.readable=!1,i.emit("end"),t.autoDestroy)){var e=i._writableState;(!e||e.autoDestroy&&e.finished)&&i.destroy()}}function U(t,i){for(var e=0,n=t.length;e=i.highWaterMark:i.length>0)||i.ended))return u("read: emitReadable",i.length,i.ended),0===i.length&&i.ended?F(this):O(this),null;if(0===(t=A(t,i))&&i.ended)return 0===i.length&&F(this),null;var n,r=i.needReadable;return u("need readable",r),(0===i.length||i.length-t0?L(t,i):null)?(i.needReadable=i.length<=i.highWaterMark,t=0):(i.length-=t,i.awaitDrain=0),0===i.length&&(i.ended||(i.needReadable=!0),e!==t&&i.ended&&F(this)),null!==n&&this.emit("data",n),n},S.prototype._read=function(t){M(this,new b("_read()"))},S.prototype.pipe=function(t,i){var e=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,i);var s=(!i||!1!==i.end)&&t!==process.stdout&&t!==process.stderr?a:p;function o(i,r){u("onunpipe"),i===e&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,u("cleanup"),t.removeListener("close",d),t.removeListener("finish",v),t.removeListener("drain",h),t.removeListener("error",l),t.removeListener("unpipe",o),e.removeListener("end",a),e.removeListener("end",p),e.removeListener("data",c),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function a(){u("onend"),t.end()}n.endEmitted?process.nextTick(s):e.once("end",s),t.on("unpipe",o);var h=function(t){return function(){var i=t._readableState;u("pipeOnDrain",i.awaitDrain),i.awaitDrain&&i.awaitDrain--,0===i.awaitDrain&&r(t,"data")&&(i.flowing=!0,D(t))}}(e);t.on("drain",h);var f=!1;function c(i){u("ondata");var r=t.write(i);u("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==U(n.pipes,t))&&!f&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),e.pause())}function l(i){u("onerror",i),p(),t.removeListener("error",l),0===r(t,"error")&&M(t,i)}function d(){t.removeListener("finish",v),p()}function v(){u("onfinish"),t.removeListener("close",d),p()}function p(){u("unpipe"),e.unpipe(t)}return e.on("data",c),function(t,i,e){if("function"==typeof t.prependListener)return t.prependListener(i,e);t._events&&t._events[i]?Array.isArray(t._events[i])?t._events[i].unshift(e):t._events[i]=[e,t._events[i]]:t.on(i,e)}(t,"error",l),t.once("close",d),t.once("finish",v),t.emit("pipe",e),n.flowing||(u("pipe resume"),e.resume()),t},S.prototype.unpipe=function(t){var i=this._readableState,e={hasUnpiped:!1};if(0===i.pipesCount)return this;if(1===i.pipesCount)return t&&t!==i.pipes||(t||(t=i.pipes),i.pipes=null,i.pipesCount=0,i.flowing=!1,t&&t.emit("unpipe",this,e)),this;if(!t){var n=i.pipes,r=i.pipesCount;i.pipes=null,i.pipesCount=0,i.flowing=!1;for(var s=0;s0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?O(this):n.reading||process.nextTick(P,this))),e},S.prototype.addListener=S.prototype.on,S.prototype.removeListener=function(t,i){var e=s.prototype.removeListener.call(this,t,i);return"readable"===t&&process.nextTick(R,this),e},S.prototype.removeAllListeners=function(t){var i=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||process.nextTick(R,this),i},S.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!t.readableListening,function(t,i){i.resumeScheduled||(i.resumeScheduled=!0,process.nextTick(N,t,i))}(this,t)),t.paused=!1,this},S.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},S.prototype.wrap=function(t){var i=this,e=this._readableState,n=!1;for(var r in t.on("end",(function(){if(u("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&i.push(t)}i.push(null)})),t.on("data",(function(r){(u("wrapped data"),e.decoder&&(r=e.decoder.write(r)),e.objectMode&&null==r)||(e.objectMode||r&&r.length)&&(i.push(r)||(n=!0,t.pause()))})),t)void 0===this[r]&&"function"==typeof t[r]&&(this[r]=function(i){return function(){return t[i].apply(t,arguments)}}(r));for(var s=0;s-1))throw new w(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(t,i,e){e(new v("_write()"))},S.prototype._writev=null,S.prototype.end=function(t,i,e){var n=this._writableState;return"function"==typeof t?(e=t,t=null,i=null):"function"==typeof i&&(e=i,i=null),null!=t&&this.write(t,i),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,i,e){i.ending=!0,j(t,i),e&&(i.finished?process.nextTick(e):t.once("finish",e));i.ended=!0,t.writable=!1}(this,n,e),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),S.prototype.destroy=f.destroy,S.prototype._undestroy=f.undestroy,S.prototype._destroy=function(t,i){i(t)}},64157:function(t,i,e){"use strict";var n;function r(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var s=e(85027),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),h=Symbol("ended"),f=Symbol("lastPromise"),c=Symbol("handlePromise"),l=Symbol("stream");function d(t,i){return{value:t,done:i}}function v(t){var i=t[o];if(null!==i){var e=t[l].read();null!==e&&(t[f]=null,t[o]=null,t[a]=null,i(d(e,!1)))}}function p(t){process.nextTick(v,t)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((r(n={get stream(){return this[l]},next:function(){var t=this,i=this[u];if(null!==i)return Promise.reject(i);if(this[h])return Promise.resolve(d(void 0,!0));if(this[l].destroyed)return new Promise((function(i,e){process.nextTick((function(){t[u]?e(t[u]):i(d(void 0,!0))}))}));var e,n=this[f];if(n)e=new Promise(function(t,i){return function(e,n){t.then((function(){i[h]?e(d(void 0,!0)):i[c](e,n)}),n)}}(n,this));else{var r=this[l].read();if(null!==r)return Promise.resolve(d(r,!1));e=new Promise(this[c])}return this[f]=e,e}},Symbol.asyncIterator,(function(){return this})),r(n,"return",(function(){var t=this;return new Promise((function(i,e){t[l].destroy(null,(function(t){t?e(t):i(d(void 0,!0))}))}))})),n),m);t.exports=function(t){var i,e=Object.create(y,(r(i={},l,{value:t,writable:!0}),r(i,o,{value:null,writable:!0}),r(i,a,{value:null,writable:!0}),r(i,u,{value:null,writable:!0}),r(i,h,{value:t._readableState.endEmitted,writable:!0}),r(i,c,{value:function(t,i){var n=e[l].read();n?(e[f]=null,e[o]=null,e[a]=null,t(d(n,!1))):(e[o]=t,e[a]=i)},writable:!0}),i));return e[f]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var i=e[a];return null!==i&&(e[f]=null,e[o]=null,e[a]=null,i(t)),void(e[u]=t)}var n=e[o];null!==n&&(e[f]=null,e[o]=null,e[a]=null,n(d(void 0,!0))),e[h]=!0})),t.on("readable",p.bind(null,e)),e}},57712:function(t,i,e){"use strict";function n(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),e.push.apply(e,n)}return e}function r(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function s(t,i){for(var e=0;e0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(t){var i={data:t,next:this.head};0===this.length&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var i=this.head,e=""+i.data;i=i.next;)e+=t+i.data;return e}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var i,e,n,r=o.allocUnsafe(t>>>0),s=this.head,a=0;s;)i=s.data,e=r,n=a,o.prototype.copy.call(i,e,n),a+=s.data.length,s=s.next;return r}},{key:"consume",value:function(t,i){var e;return tr.length?r.length:t;if(s===r.length?n+=r:n+=r.slice(0,t),0==(t-=s)){s===r.length?(++e,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=r.slice(s));break}++e}return this.length-=e,n}},{key:"_getBuffer",value:function(t){var i=o.allocUnsafe(t),e=this.head,n=1;for(e.data.copy(i),t-=e.data.length;e=e.next;){var r=e.data,s=t>r.length?r.length:t;if(r.copy(i,i.length-t,0,s),0==(t-=s)){s===r.length?(++n,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=r.slice(s));break}++n}return this.length-=n,i}},{key:u,value:function(t,i){return a(this,function(t){for(var i=1;i0,(function(t){n||(n=t),t&&o.forEach(h),s||(o.forEach(h),r(n))}))}));return i.reduce(f)}},25985:function(t,i,e){"use strict";var n=e(96938).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,i,e,r){var s=function(t,i,e){return null!=t.highWaterMark?t.highWaterMark:i?t[e]:null}(i,r,e);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new n(r?e:"highWaterMark",s);return Math.floor(s)}return t.objectMode?16:16384}}},46052:function(t,i,e){t.exports=e(50343).EventEmitter},38310:function(t,i,e){(i=t.exports=e(35327)).Stream=i,i.Readable=i,i.Writable=e(54567),i.Duplex=e(24439),i.Transform=e(12175),i.PassThrough=e(83754),i.finished=e(85027),i.pipeline=e(20410)},34361:function(t,i,e){"use strict";var n=e(61562).Buffer,r=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(t){var i;switch(this.encoding=function(t){var i=function(t){if(!t)return"utf8";for(var i;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(i)return;t=(""+t).toLowerCase(),i=!0}}(t);if("string"!=typeof i&&(n.isEncoding===r||!r(t)))throw new Error("Unknown encoding: "+t);return i||t}(t),this.encoding){case"utf16le":this.text=u,this.end=h,i=4;break;case"utf8":this.fillLast=a,i=4;break;case"base64":this.text=f,this.end=c,i=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(i)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var i=this.lastTotal-this.lastNeed,e=function(t,i,e){if(128!=(192&i[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&i.length>1){if(128!=(192&i[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&i.length>2&&128!=(192&i[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==e?e:this.lastNeed<=t.length?(t.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,i,0,t.length),void(this.lastNeed-=t.length))}function u(t,i){if((t.length-i)%2==0){var e=t.toString("utf16le",i);if(e){var n=e.charCodeAt(e.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],e.slice(0,-1)}return e}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",i,t.length-1)}function h(t){var i=t&&t.length?this.write(t):"";if(this.lastNeed){var e=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,e)}return i}function f(t,i){var e=(t.length-i)%3;return 0===e?t.toString("base64",i):(this.lastNeed=3-e,this.lastTotal=3,1===e?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",i,t.length-e))}function c(t){var i=t&&t.length?this.write(t):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}i.s=s,s.prototype.write=function(t){if(0===t.length)return"";var i,e;if(this.lastNeed){if(void 0===(i=this.fillLast(t)))return"";e=this.lastNeed,this.lastNeed=0}else e=0;return e=0)return r>0&&(t.lastNeed=r-1),r;if(--n=0)return r>0&&(t.lastNeed=r-2),r;if(--n=0)return r>0&&(2===r?r=0:t.lastNeed=r-3),r;return 0}(this,t,i);if(!this.lastNeed)return t.toString("utf8",i);this.lastTotal=e;var n=t.length-(e-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",i,n)},s.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},61562:function(t,i,e){ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var n=e(30816),r=n.Buffer;function s(t,i){for(var e in t)i[e]=t[e]}function o(t,i,e){return r(t,i,e)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(s(n,i),i.Buffer=o),o.prototype=Object.create(r.prototype),s(r,o),o.from=function(t,i,e){if("number"==typeof t)throw new TypeError("Argument must not be a number");return r(t,i,e)},o.alloc=function(t,i,e){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=r(t);return void 0!==i?"string"==typeof e?n.fill(i,e):n.fill(i):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},36785:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.serialize=i.deserialize=i.registerSerializer=void 0;const n=e(28139);let r=n.DefaultSerializer;i.registerSerializer=function(t){r=n.extendSerializer(r,t)},i.deserialize=function(t){return r.deserialize(t)},i.serialize=function(t){return r.serialize(t)}},81407:function(t,i,e){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,i,e,n){void 0===n&&(n=e),Object.defineProperty(t,n,{enumerable:!0,get:function(){return i[e]}})}:function(t,i,e,n){void 0===n&&(n=e),t[n]=i[e]}),r=this&&this.__exportStar||function(t,i){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(i,e)||n(i,t,e)};Object.defineProperty(i,"__esModule",{value:!0}),i.Transfer=i.DefaultSerializer=i.expose=i.registerSerializer=void 0;var s=e(36785);Object.defineProperty(i,"registerSerializer",{enumerable:!0,get:function(){return s.registerSerializer}}),r(e(94715),i);var o=e(94482);Object.defineProperty(i,"expose",{enumerable:!0,get:function(){return o.expose}});var a=e(28139);Object.defineProperty(i,"DefaultSerializer",{enumerable:!0,get:function(){return a.DefaultSerializer}});var u=e(50398);Object.defineProperty(i,"Transfer",{enumerable:!0,get:function(){return u.Transfer}})},78007:function(t,i){"use strict";let e;function n(t){return(""+t).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)?\/[^/]+(?:\?.*)?$/,"$1")+"/"}Object.defineProperty(i,"__esModule",{value:!0}),i.getBundleURL=i.getBaseURL=void 0,i.getBundleURL=function(){return e||(e=function(){try{throw new Error}catch(t){const i=(""+t.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);if(i)return n(i[0])}return"/"}()),e},i.getBaseURL=n},51883:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.isWorkerRuntime=i.getWorkerImplementation=i.defaultPoolSize=void 0;const n=e(78007);i.defaultPoolSize="undefined"!=typeof navigator&&navigator.hardwareConcurrency?navigator.hardwareConcurrency:4;const r=t=>/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t);function s(t){const i=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(i)}let o;i.getWorkerImplementation=function(){return o||(o=function(){if("undefined"==typeof Worker)return class{constructor(){throw Error("No web worker implementation available. You might have tried to spawn a worker within a worker in a browser that doesn't support workers in workers.")}};class t extends Worker{constructor(t,i){var e,o;"string"==typeof t&&i&&i._baseURL?t=new URL(t,i._baseURL):"string"==typeof t&&!r(t)&&n.getBundleURL().match(/^file:\/\//i)&&(t=new URL(t,n.getBundleURL().replace(/\/[^\/]+$/,"/")),(null===(e=null==i?void 0:i.CORSWorkaround)||void 0===e||e)&&(t=s(`importScripts(${JSON.stringify(t)});`))),"string"==typeof t&&r(t)&&(null===(o=null==i?void 0:i.CORSWorkaround)||void 0===o||o)&&(t=s(`importScripts(${JSON.stringify(t)});`)),super(t,i)}}class i extends t{constructor(t,i){super(window.URL.createObjectURL(t),i)}static fromText(t,e){const n=new window.Blob([t],{type:"text/javascript"});return new i(n,e)}}return{blob:i,default:t}}()),o},i.isWorkerRuntime=function(){const t="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||t)}},94715:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Worker=i.BlobWorker=i.isWorkerRuntime=i.Thread=i.spawn=i.Pool=void 0;const n=e(51883);Object.defineProperty(i,"isWorkerRuntime",{enumerable:!0,get:function(){return n.isWorkerRuntime}});var r=e(44783);Object.defineProperty(i,"Pool",{enumerable:!0,get:function(){return r.Pool}});var s=e(60598);Object.defineProperty(i,"spawn",{enumerable:!0,get:function(){return s.spawn}});var o=e(13699);Object.defineProperty(i,"Thread",{enumerable:!0,get:function(){return o.Thread}}),i.BlobWorker=n.getWorkerImplementation().blob,i.Worker=n.getWorkerImplementation().default},84153:function(t,i,e){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0}),i.createProxyModule=i.createProxyFunction=void 0;const r=n(e(96292)),s=e(67493),o=e(36785),a=e(49749),u=e(50398),h=e(89886),f=r.default("threads:master:messages");let c=1;function l(t,i){return new s.Observable((e=>{let n;const r=s=>{var a;if(f("Message from worker:",s.data),s.data&&s.data.uid===i)if((a=s.data)&&a.type===h.WorkerMessageType.running)n=s.data.resultType;else if((t=>t&&t.type===h.WorkerMessageType.result)(s.data))"promise"===n?(void 0!==s.data.payload&&e.next(o.deserialize(s.data.payload)),e.complete(),t.removeEventListener("message",r)):(s.data.payload&&e.next(o.deserialize(s.data.payload)),s.data.complete&&(e.complete(),t.removeEventListener("message",r)));else if((t=>t&&t.type===h.WorkerMessageType.error)(s.data)){const i=o.deserialize(s.data.error);e.error(i),t.removeEventListener("message",r)}};return t.addEventListener("message",r),()=>{if("observable"===n||!n){const e={type:h.MasterMessageType.cancel,uid:i};t.postMessage(e)}t.removeEventListener("message",r)}}))}function d(t,i){return(...e)=>{const n=c++,{args:r,transferables:d}=function(t){if(0===t.length)return{args:[],transferables:[]};const i=[],e=[];for(const n of t)u.isTransferDescriptor(n)?(i.push(o.serialize(n.send)),e.push(...n.transferables)):i.push(o.serialize(n));return{args:i,transferables:0===e.length?e:(n=e,Array.from(new Set(n)))};var n}(e),v={type:h.MasterMessageType.run,uid:n,method:i,args:r};f("Sending command to run function to worker:",v);try{t.postMessage(v,d)}catch(t){return a.ObservablePromise.from(Promise.reject(t))}return a.ObservablePromise.from(s.multicast(l(t,n)))}}i.createProxyFunction=d,i.createProxyModule=function(t,i){const e={};for(const n of i)e[n]=d(t,n);return e}},18659:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.PoolEventType=void 0,function(t){t.initialized="initialized",t.taskCanceled="taskCanceled",t.taskCompleted="taskCompleted",t.taskFailed="taskFailed",t.taskQueued="taskQueued",t.taskQueueDrained="taskQueueDrained",t.taskStart="taskStart",t.terminated="terminated"}(i.PoolEventType||(i.PoolEventType={}))},44783:function(t,i,e){"use strict";var n=this&&this.__awaiter||function(t,i,e,n){return new(e||(e=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0}),i.Pool=i.Thread=i.PoolEventType=void 0;const s=r(e(96292)),o=e(67493),a=e(24946),u=e(51883),h=e(18659);Object.defineProperty(i,"PoolEventType",{enumerable:!0,get:function(){return h.PoolEventType}});const f=e(13699);Object.defineProperty(i,"Thread",{enumerable:!0,get:function(){return f.Thread}});let c=1;class l{constructor(t,i){this.eventSubject=new o.Subject,this.initErrors=[],this.isClosing=!1,this.nextTaskID=1,this.taskQueue=[];const e="number"==typeof i?{size:i}:i||{},{size:n=u.defaultPoolSize}=e;var r;this.debug=s.default(`threads:pool:${r=e.name||String(c++),r.replace(/\W/g," ").trim().replace(/\s+/g,"-")}`),this.options=e,this.workers=function(t,i){return function(t){const i=[];for(let e=0;e({init:t(),runningTasks:[]})))}(t,n),this.eventObservable=o.multicast(o.Observable.from(this.eventSubject)),Promise.all(this.workers.map((t=>t.init))).then((()=>this.eventSubject.next({type:h.PoolEventType.initialized,size:this.workers.length})),(t=>{this.debug("Error while initializing pool worker:",t),this.eventSubject.error(t),this.initErrors.push(t)}))}findIdlingWorker(){const{concurrency:t=1}=this.options;return this.workers.find((i=>i.runningTasks.lengthn(this,void 0,void 0,(function*(){var n;yield(n=0,new Promise((t=>setTimeout(t,n))));try{yield this.runPoolTask(t,i)}finally{t.runningTasks=t.runningTasks.filter((t=>t!==e)),this.isClosing||this.scheduleWork()}})))();t.runningTasks.push(e)}))}scheduleWork(){this.debug("Attempt de-queueing a task in order to run it...");const t=this.findIdlingWorker();if(!t)return;const i=this.taskQueue.shift();if(!i)return this.debug("Task queue is empty"),void this.eventSubject.next({type:h.PoolEventType.taskQueueDrained});this.run(t,i)}taskCompletion(t){return new Promise(((i,e)=>{const n=this.events().subscribe((r=>{r.type===h.PoolEventType.taskCompleted&&r.taskID===t?(n.unsubscribe(),i(r.returnValue)):r.type===h.PoolEventType.taskFailed&&r.taskID===t?(n.unsubscribe(),e(r.error)):r.type===h.PoolEventType.terminated&&(n.unsubscribe(),e(Error("Pool has been terminated before task was run.")))}))}))}settled(t=!1){return n(this,void 0,void 0,(function*(){const i=()=>{return t=this.workers,i=t=>t.runningTasks,t.reduce(((t,e)=>[...t,...i(e)]),[]);var t,i},e=[],n=this.eventObservable.subscribe((t=>{t.type===h.PoolEventType.taskFailed&&e.push(t.error)}));return this.initErrors.length>0?Promise.reject(this.initErrors[0]):t&&0===this.taskQueue.length?(yield a.allSettled(i()),e):(yield new Promise(((t,i)=>{const e=this.eventObservable.subscribe({next(i){i.type===h.PoolEventType.taskQueueDrained&&(e.unsubscribe(),t(void 0))},error:i})})),yield a.allSettled(i()),n.unsubscribe(),e)}))}completed(t=!1){return n(this,void 0,void 0,(function*(){const i=this.settled(t),e=new Promise(((t,e)=>{const n=this.eventObservable.subscribe({next(r){r.type===h.PoolEventType.taskQueueDrained?(n.unsubscribe(),t(i)):r.type===h.PoolEventType.taskFailed&&(n.unsubscribe(),e(r.error))},error:e})})),n=yield Promise.race([i,e]);if(n.length>0)throw n[0]}))}events(){return this.eventObservable}queue(t){const{maxQueuedJobs:i=1/0}=this.options;if(this.isClosing)throw Error("Cannot schedule pool tasks after terminate() has been called.");if(this.initErrors.length>0)throw this.initErrors[0];const e=this.nextTaskID++,n=this.taskCompletion(e);n.catch((t=>{this.debug(`Task #${e} errored:`,t)}));const r={id:e,run:t,cancel:()=>{-1!==this.taskQueue.indexOf(r)&&(this.taskQueue=this.taskQueue.filter((t=>t!==r)),this.eventSubject.next({type:h.PoolEventType.taskCanceled,taskID:r.id}))},then:n.then.bind(n)};if(this.taskQueue.length>=i)throw Error("Maximum number of pool tasks queued. Refusing to queue another one.\nThis usually happens for one of two reasons: We are either at peak workload right now or some tasks just won't finish, thus blocking the pool.");return this.debug(`Queueing task #${r.id}...`),this.taskQueue.push(r),this.eventSubject.next({type:h.PoolEventType.taskQueued,taskID:r.id}),this.scheduleWork(),r}terminate(t){return n(this,void 0,void 0,(function*(){this.isClosing=!0,t||(yield this.completed(!0)),this.eventSubject.next({type:h.PoolEventType.terminated,remainingQueue:[...this.taskQueue]}),this.eventSubject.complete(),yield Promise.all(this.workers.map((t=>n(this,void 0,void 0,(function*(){return f.Thread.terminate(yield t.init)})))))}))}}function d(t,i){return new l(t,i)}l.EventType=h.PoolEventType,d.EventType=h.PoolEventType,i.Pool=d},60598:function(t,i,e){"use strict";var n=this&&this.__awaiter||function(t,i,e,n){return new(e||(e=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0}),i.spawn=void 0;const s=r(e(96292)),o=e(67493),a=e(36785),u=e(43692),h=e(54679),f=e(75703),c=e(84153),l=s.default("threads:master:messages"),d=s.default("threads:master:spawn"),v=s.default("threads:master:thread-utils"),p="undefined"!=typeof process&&process.env.THREADS_WORKER_INIT_TIMEOUT?Number.parseInt(process.env.THREADS_WORKER_INIT_TIMEOUT,10):1e4;function m(t,i,e,n){const r=e.filter((t=>t.type===f.WorkerEventType.internalError)).map((t=>t.error));return Object.assign(t,{[h.$errors]:r,[h.$events]:e,[h.$terminate]:n,[h.$worker]:i})}i.spawn=function(t,i){return n(this,void 0,void 0,(function*(){d("Initializing new thread");const e=i&&i.timeout?i.timeout:p,r=(yield function(t,i,e){return n(this,void 0,void 0,(function*(){let n;const r=new Promise(((t,r)=>{n=setTimeout((()=>r(Error(e))),i)})),s=yield Promise.race([t,r]);return clearTimeout(n),s}))}(function(t){return new Promise(((i,e)=>{const n=r=>{var s;l("Message from worker before finishing initialization:",r.data),(s=r.data)&&"init"===s.type?(t.removeEventListener("message",n),i(r.data)):(t=>t&&"uncaughtError"===t.type)(r.data)&&(t.removeEventListener("message",n),e(a.deserialize(r.data.error)))};t.addEventListener("message",n)}))}(t),e,`Timeout: Did not receive an init message from worker after ${e}ms. Make sure the worker calls expose().`)).exposed,{termination:s,terminate:h}=function(t){const[i,e]=u.createPromiseWithResolver();return{terminate:()=>n(this,void 0,void 0,(function*(){v("Terminating worker"),yield t.terminate(),e()})),termination:i}}(t),y=function(t,i){return new o.Observable((e=>{const n=t=>{const i={type:f.WorkerEventType.message,data:t.data};e.next(i)},r=t=>{v("Unhandled promise rejection event in thread:",t);const i={type:f.WorkerEventType.internalError,error:Error(t.reason)};e.next(i)};t.addEventListener("message",n),t.addEventListener("unhandledrejection",r),i.then((()=>{const i={type:f.WorkerEventType.termination};t.removeEventListener("message",n),t.removeEventListener("unhandledrejection",r),e.next(i),e.complete()}))}))}(t,s);if("function"===r.type){return m(c.createProxyFunction(t),t,y,h)}if("module"===r.type){return m(c.createProxyModule(t,r.methods),t,y,h)}{const t=r.type;throw Error(`Worker init message states unexpected type of expose(): ${t}`)}}))}},13699:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Thread=void 0;const n=e(54679);function r(t){throw Error(t)}i.Thread={errors:t=>t[n.$errors]||r("Error observable not found. Make sure to pass a thread instance as returned by the spawn() promise."),events:t=>t[n.$events]||r("Events observable not found. Make sure to pass a thread instance as returned by the spawn() promise."),terminate:t=>t[n.$terminate]()}},49749:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.ObservablePromise=void 0;const n=e(67493),r=()=>{},s=t=>t,o=t=>Promise.resolve().then(t);function a(t){throw t}class u extends n.Observable{constructor(t){super((i=>{const e=this,n=Object.assign(Object.assign({},i),{complete(){i.complete(),e.onCompletion()},error(t){i.error(t),e.onError(t)},next(t){i.next(t),e.onNext(t)}});try{return this.initHasRun=!0,t(n)}catch(t){n.error(t)}})),this.initHasRun=!1,this.fulfillmentCallbacks=[],this.rejectionCallbacks=[],this.firstValueSet=!1,this.state="pending"}onNext(t){this.firstValueSet||(this.firstValue=t,this.firstValueSet=!0)}onError(t){this.state="rejected",this.rejection=t;for(const i of this.rejectionCallbacks)o((()=>i(t)))}onCompletion(){this.state="fulfilled";for(const t of this.fulfillmentCallbacks)o((()=>t(this.firstValue)))}then(t,i){const e=t||s,n=i||a;let r=!1;return new Promise(((t,i)=>{const s=e=>{if(!r){r=!0;try{t(n(e))}catch(t){i(t)}}};return this.initHasRun||this.subscribe({error:s}),"fulfilled"===this.state?t(e(this.firstValue)):"rejected"===this.state?(r=!0,t(n(this.rejection))):(this.fulfillmentCallbacks.push((i=>{try{t(e(i))}catch(t){s(t)}})),void this.rejectionCallbacks.push(s))}))}catch(t){return this.then(void 0,t)}finally(t){const i=t||r;return this.then((t=>(i(),t)),(()=>i()))}static from(t){return function(t){return t&&"function"==typeof t.then}(t)?new u((i=>{t.then((t=>{i.next(t),i.complete()}),(t=>{i.error(t)}))})):super.from(t)}}i.ObservablePromise=u},24946:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.allSettled=void 0,i.allSettled=function(t){return Promise.all(t.map((t=>{const i=t=>({status:"fulfilled",value:t}),e=t=>({status:"rejected",reason:t}),n=Promise.resolve(t);try{return n.then(i,e)}catch(t){return Promise.reject(t)}})))}},43692:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.createPromiseWithResolver=void 0;const e=()=>{};i.createPromiseWithResolver=function(){let t,i=!1,n=e;return[new Promise((e=>{i?e(t):n=e})),e=>{i=!0,t=e,n(t)}]}},28139:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.DefaultSerializer=i.extendSerializer=void 0,i.extendSerializer=function(t,i){const e=t.deserialize.bind(t),n=t.serialize.bind(t);return{deserialize:t=>i.deserialize(t,e),serialize:t=>i.serialize(t,n)}};const e={deserialize:t=>Object.assign(Error(t.message),{name:t.name,stack:t.stack}),serialize:t=>({__error_marker:"$$error",message:t.message,name:t.name,stack:t.stack})};i.DefaultSerializer={deserialize(t){return(i=t)&&"object"==typeof i&&"__error_marker"in i&&"$$error"===i.__error_marker?e.deserialize(t):t;var i},serialize:t=>t instanceof Error?e.serialize(t):t}},54679:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.$worker=i.$transferable=i.$terminate=i.$events=i.$errors=void 0,i.$errors=Symbol("thread.errors"),i.$events=Symbol("thread.events"),i.$terminate=Symbol("thread.terminate"),i.$transferable=Symbol("thread.transferable"),i.$worker=Symbol("thread.worker")},50398:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.Transfer=i.isTransferDescriptor=void 0;const n=e(54679);i.isTransferDescriptor=function(t){return t&&"object"==typeof t&&t[n.$transferable]},i.Transfer=function(t,i){if(!i){if(!(e=t)||"object"!=typeof e)throw Error();i=[t]}var e;return{[n.$transferable]:!0,send:t,transferables:i}}},75703:function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.WorkerEventType=void 0;e(54679);!function(t){t.internalError="internalError",t.message="message",t.termination="termination"}(i.WorkerEventType||(i.WorkerEventType={}))},89886:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.WorkerMessageType=i.MasterMessageType=void 0,function(t){t.cancel="cancel",t.run="run"}(i.MasterMessageType||(i.MasterMessageType={})),function(t){t.error="error",t.init="init",t.result="result",t.running="running",t.uncaughtError="uncaughtError"}(i.WorkerMessageType||(i.WorkerMessageType={}))},9505:function(t,i){"use strict";Object.defineProperty(i,"__esModule",{value:!0});i.default={isWorkerRuntime:function(){const t="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||t)},postMessageToMaster:function(t,i){self.postMessage(t,i)},subscribeToMasterMessages:function(t){const i=i=>{t(i.data)};return self.addEventListener("message",i),()=>{self.removeEventListener("message",i)}}}},94482:function(t,i,e){"use strict";var n=this&&this.__awaiter||function(t,i,e,n){return new(e||(e=Promise))((function(r,s){function o(t){try{u(n.next(t))}catch(t){s(t)}}function a(t){try{u(n.throw(t))}catch(t){s(t)}}function u(t){var i;t.done?r(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(o,a)}u((n=n.apply(t,i||[])).next())}))},r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(i,"__esModule",{value:!0}),i.expose=i.isWorkerRuntime=i.Transfer=i.registerSerializer=void 0;const s=r(e(78828)),o=e(36785),a=e(50398),u=e(89886),h=r(e(9505));var f=e(36785);Object.defineProperty(i,"registerSerializer",{enumerable:!0,get:function(){return f.registerSerializer}});var c=e(50398);Object.defineProperty(i,"Transfer",{enumerable:!0,get:function(){return c.Transfer}}),i.isWorkerRuntime=h.default.isWorkerRuntime;let l=!1;const d=new Map,v=t=>t&&t.type===u.MasterMessageType.run,p=t=>s.default(t)||function(t){return t&&"object"==typeof t&&"function"==typeof t.subscribe}(t);function m(t){return a.isTransferDescriptor(t)?{payload:t.send,transferables:t.transferables}:{payload:t,transferables:void 0}}function y(t,i){const{payload:e,transferables:n}=m(i),r={type:u.WorkerMessageType.error,uid:t,error:o.serialize(e)};h.default.postMessageToMaster(r,n)}function g(t,i,e){const{payload:n,transferables:r}=m(e),s={type:u.WorkerMessageType.result,uid:t,complete:!!i||void 0,payload:n};h.default.postMessageToMaster(s,r)}function b(t){try{const i={type:u.WorkerMessageType.uncaughtError,error:o.serialize(t)};h.default.postMessageToMaster(i)}catch(i){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\nLatest error:",i,"\nOriginal error:",t)}}function w(t,i,e){return n(this,void 0,void 0,(function*(){let n;try{n=i(...e)}catch(i){return y(t,i)}const r=p(n)?"observable":"promise";if(function(t,i){const e={type:u.WorkerMessageType.running,uid:t,resultType:i};h.default.postMessageToMaster(e)}(t,r),p(n)){const i=n.subscribe((i=>g(t,!1,o.serialize(i))),(i=>{y(t,o.serialize(i)),d.delete(t)}),(()=>{g(t,!0),d.delete(t)}));d.set(t,i)}else try{const i=yield n;g(t,!0,o.serialize(i))}catch(i){y(t,o.serialize(i))}}))}i.expose=function(t){if(!h.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(l)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(l=!0,"function"==typeof t)h.default.subscribeToMasterMessages((i=>{v(i)&&!i.method&&w(i.uid,t,i.args.map(o.deserialize))})),function(){const t={type:u.WorkerMessageType.init,exposed:{type:"function"}};h.default.postMessageToMaster(t)}();else{if("object"!=typeof t||!t)throw Error(`Invalid argument passed to expose(). Expected a function or an object, got: ${t}`);h.default.subscribeToMasterMessages((i=>{v(i)&&i.method&&w(i.uid,t[i.method],i.args.map(o.deserialize))}));!function(t){const i={type:u.WorkerMessageType.init,exposed:{type:"module",methods:t}};h.default.postMessageToMaster(i)}(Object.keys(t).filter((i=>"function"==typeof t[i])))}h.default.subscribeToMasterMessages((t=>{if((i=t)&&i.type===u.MasterMessageType.cancel){const i=t.uid,e=d.get(i);e&&(e.unsubscribe(),d.delete(i))}var i}))},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&h.default.isWorkerRuntime()&&(self.addEventListener("error",(t=>{setTimeout((()=>b(t.error||t)),250)})),self.addEventListener("unhandledrejection",(t=>{const i=t.reason;i&&"string"==typeof i.message&&setTimeout((()=>b(i)),250)}))),"undefined"!=typeof process&&"function"==typeof process.on&&h.default.isWorkerRuntime()&&(process.on("uncaughtException",(t=>{setTimeout((()=>b(t)),250)})),process.on("unhandledRejection",(t=>{t&&"string"==typeof t.message&&setTimeout((()=>b(t)),250)})))},2953:function(t,i,e){var n=e(38310).Transform,r=e(70087);function s(t){n.call(this,t),this._destroyed=!1}function o(t,i,e){e(null,t)}function a(t){return function(i,e,n){return"function"==typeof i&&(n=e,e=i,i={}),"function"!=typeof e&&(e=o),"function"!=typeof n&&(n=null),t(i,e,n)}}r(s,n),s.prototype.destroy=function(t){if(!this._destroyed){this._destroyed=!0;var i=this;process.nextTick((function(){t&&i.emit("error",t),i.emit("close")}))}},t.exports=a((function(t,i,e){var n=new s(t);return n._transform=i,e&&(n._flush=e),n})),t.exports.ctor=a((function(t,i,e){function n(i){if(!(this instanceof n))return new n(i);this.options=Object.assign({},t,i),s.call(this,this.options)}return r(n,s),n.prototype._transform=i,e&&(n.prototype._flush=e),n})),t.exports.obj=a((function(t,i,e){var n=new s(Object.assign({objectMode:!0,highWaterMark:16},t));return n._transform=i,e&&(n._flush=e),n}))},21920:function(t,i,e){function n(t,i){"use strict";var e=(i=i||{}).pos||0,r="<".charCodeAt(0),s=">".charCodeAt(0),o="-".charCodeAt(0),a="/".charCodeAt(0),u="!".charCodeAt(0),h="'".charCodeAt(0),f='"'.charCodeAt(0),c="[".charCodeAt(0);"]".charCodeAt(0);function l(){for(var i=[];t[e];)if(t.charCodeAt(e)==r){if(t.charCodeAt(e+1)===a)return(e=t.indexOf(">",e))+1&&(e+=1),i;if(t.charCodeAt(e+1)===u){if(t.charCodeAt(e+2)==o){for(;-1!==e&&(t.charCodeAt(e)!==s||t.charCodeAt(e-1)!=o||t.charCodeAt(e-2)!=o||-1==e);)e=t.indexOf(">",e+1);-1===e&&(e=t.length)}else{if(t.charCodeAt(e+2)===c&&t.charCodeAt(e+8)===c&&"cdata"===t.substr(e+3,5).toLowerCase()){var n=t.indexOf("]]>",e);-1==n?(i.push(t.substr(e+8)),e=t.length):(i.push(t.substring(e+9,n)),e=n+3);continue}for(e+=2;t.charCodeAt(e)!==s&&t[e];)e++}e++;continue}var h=m();i.push(h)}else{var f=d();f.trim().length>0&&i.push(f),e++}return i}function d(){var i=e;return-2===(e=t.indexOf("<",e)-1)&&(e=t.length),t.slice(i,e+1)}function v(){for(var i=e;-1==="\r\n\t>/= ".indexOf(t[e])&&t[e];)e++;return t.slice(i,e)}var p=i.noChildNodes||["img","br","input","meta","link"];function m(){e++;const i=v(),n={};let r=[];for(;t.charCodeAt(e)!==s&&t[e];){var o=t.charCodeAt(e);if(o>64&&o<91||o>96&&o<123){for(var u=v(),c=t.charCodeAt(e);c&&c!==h&&c!==f&&!(c>64&&c<91||c>96&&c<123)&&c!==s;)e++,c=t.charCodeAt(e);if(c===h||c===f){var d=y();if(-1===e)return{tagName:i,attributes:n,children:r}}else d=null,e--;n[u]=d}e++}if(t.charCodeAt(e-1)!==a)if("script"==i){var m=e+1;e=t.indexOf("<\/script>",e),r=[t.slice(m,e)],e+=9}else if("style"==i){m=e+1;e=t.indexOf("",e),r=[t.slice(m,e)],e+=8}else-1==p.indexOf(i)&&(e++,r=l());else e++;return{tagName:i,attributes:n,children:r}}function y(){var i=t[e],n=e+1;return e=t.indexOf(i,n),t.slice(n,e)}var g,b=null;if(void 0!==i.attrValue){i.attrName=i.attrName||"id";for(b=[];-1!==(g=void 0,g=new RegExp("\\s"+i.attrName+"\\s*=['\"]"+i.attrValue+"['\"]").exec(t),e=g?g.index:-1);)-1!==(e=t.lastIndexOf("<",e))&&b.push(m()),t=t.substr(e),e=0}else b=i.parseNode?m():l();return i.filter&&(b=n.filter(b,i.filter)),i.setPos&&(b.pos=e),b}n.simplify=function(t){var i={};if(!t.length)return"";if(1===t.length&&"string"==typeof t[0])return t[0];for(var e in t.forEach((function(t){if("object"==typeof t){i[t.tagName]||(i[t.tagName]=[]);var e=n.simplify(t.children);i[t.tagName].push(e),Object.keys(t.attributes).length&&(e._attributes=t.attributes)}})),i)1==i[e].length&&(i[e]=i[e][0]);return i},n.simplifyLostLess=function(t,i={}){var e={};return t.length?1===t.length&&"string"==typeof t[0]?Object.keys(i).length?{_attributes:i,value:t[0]}:t[0]:(t.forEach((function(t){if("object"==typeof t){e[t.tagName]||(e[t.tagName]=[]);var i=n.simplifyLostLess(t.children||[],t.attributes);e[t.tagName].push(i),Object.keys(t.attributes).length&&(i._attributes=t.attributes)}})),e):""},n.filter=function(t,i,e=0,r=""){var s=[];return t.forEach((function(t,o){if("object"==typeof t&&i(t,o,e,r)&&s.push(t),t.children){var a=n.filter(t.children,i,e+1,(r?r+".":"")+o+"."+t.tagName);s=s.concat(a)}})),s},n.stringify=function(t){var i="";function e(t){if(t)for(var e=0;e"}return e(t),i},n.toContentString=function(t){if(Array.isArray(t)){var i="";return t.forEach((function(t){i=(i+=" "+n.toContentString(t)).trim()})),i}return"object"==typeof t?n.toContentString(t.children):" "+t},n.getElementById=function(t,i,e){var r=n(t,{attrValue:i});return e?n.simplify(r):r[0]},n.getElementsByClassName=function(t,i,e){const r=n(t,{attrName:"class",attrValue:"[a-zA-Z0-9- ]*"+i+"[a-zA-Z0-9- ]*"});return e?n.simplify(r):r},n.parseStream=function(t,i){if("string"==typeof i&&(i=i.length+2),"string"==typeof t){var r=e(64725);t=r.createReadStream(t,{start:i}),i=0}var s=i,o="";return t.on("data",(function(i){o+=i;for(var e=0;;){if(!(s=o.indexOf("<",s)+1))return void(s=e);if("/"!==o[s+1]){var r=n(o,{pos:s-1,parseNode:!0,setPos:!0});if((s=r.pos)>o.length-1||ss.length-1||r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,v=String.fromCharCode;function p(t){throw RangeError(l[t])}function m(t,i){for(var e=t.length,n=[];e--;)n[e]=i(t[e]);return n}function y(t,i){var e=t.split("@"),n="";return e.length>1&&(n=e[0]+"@",t=e[1]),n+m((t=t.replace(c,".")).split("."),i).join(".")}function g(t){for(var i,e,n=[],r=0,s=t.length;r=55296&&i<=56319&&r65535&&(i+=v((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=v(t)})).join("")}function w(t,i){return t+22+75*(t<26)-((0!=i)<<5)}function M(t,i,e){var n=0;for(t=e?d(t/700):t>>1,t+=d(t/i);t>455;n+=u)t=d(t/35);return d(n+36*t/(t+38))}function x(t){var i,e,n,r,s,o,h,f,c,l,v,m=[],y=t.length,g=0,w=128,x=72;for((e=t.lastIndexOf("-"))<0&&(e=0),n=0;n=128&&p("not-basic"),m.push(t.charCodeAt(n));for(r=e>0?e+1:0;r=y&&p("invalid-input"),((f=(v=t.charCodeAt(r++))-48<10?v-22:v-65<26?v-65:v-97<26?v-97:u)>=u||f>d((a-g)/o))&&p("overflow"),g+=f*o,!(f<(c=h<=x?1:h>=x+26?26:h-x));h+=u)o>d(a/(l=u-c))&&p("overflow"),o*=l;x=M(g-s,i=m.length+1,0==s),d(g/i)>a-w&&p("overflow"),w+=d(g/i),g%=i,m.splice(g++,0,w)}return b(m)}function k(t){var i,e,n,r,s,o,h,f,c,l,m,y,b,x,k,S=[];for(y=(t=g(t)).length,i=128,e=0,s=72,o=0;o=i&&md((a-e)/(b=n+1))&&p("overflow"),e+=(h-i)*b,i=h,o=0;oa&&p("overflow"),m==i){for(f=e,c=u;!(f<(l=c<=s?1:c>=s+26?26:c-s));c+=u)k=f-l,x=u-l,S.push(v(w(l+k%x,0))),f=d(k/x);S.push(v(w(f,0))),s=M(e,b,n==r),e=0,++n}++e,++i}return S.join("")}o={version:"1.3.2",ucs2:{decode:g,encode:b},decode:x,encode:k,toASCII:function(t){return y(t,(function(t){return f.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return y(t,(function(t){return h.test(t)?x(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return o}.call(i,e,i,t))||(t.exports=n)}()},84760:function(t,i,e){"use strict";var n=e(68884),r=e(70569);function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}i.parse=b,i.resolve=function(t,i){return b(t,!1,!0).resolve(i)},i.resolveObject=function(t,i){return t?b(t,!1,!0).resolveObject(i):i},i.format=function(t){r.isString(t)&&(t=b(t));return t instanceof s?t.format():s.prototype.format.call(t)},i.Url=s;var o=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(h),c=["%","/","?",";","#"].concat(f),l=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,v=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,p={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},g=e(48966);function b(t,i,e){if(t&&r.isObject(t)&&t instanceof s)return t;var n=new s;return n.parse(t,i,e),n}s.prototype.parse=function(t,i,e){if(!r.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var s=t.indexOf("?"),a=-1!==s&&s127?R+="x":R+=I[P];if(!R.match(d)){var D=j.slice(0,_),L=j.slice(_+1),F=I.match(v);F&&(D.push(F[1]),L.unshift(F[2])),L.length&&(b="/"+L.join(".")+b),this.hostname=D.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=n.toASCII(this.hostname));var z=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+z,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==b[0]&&(b="/"+b))}if(!p[x])for(_=0,C=f.length;_0)&&e.host.split("@"))&&(e.auth=O.shift(),e.host=e.hostname=O.shift());return e.search=t.search,e.query=t.query,r.isNull(e.pathname)&&r.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!k.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var E=k.slice(-1)[0],T=(e.host||t.host||k.length>1)&&("."===E||".."===E)||""===E,_=0,A=k.length;A>=0;A--)"."===(E=k[A])?k.splice(A,1):".."===E?(k.splice(A,1),_++):_&&(k.splice(A,1),_--);if(!M&&!x)for(;_--;_)k.unshift("..");!M||""===k[0]||k[0]&&"/"===k[0].charAt(0)||k.unshift(""),T&&"/"!==k.join("/").substr(-1)&&k.push("");var O,j=""===k[0]||k[0]&&"/"===k[0].charAt(0);S&&(e.hostname=e.host=j?"":k.length?k.shift():"",(O=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=O.shift(),e.host=e.hostname=O.shift()));return(M=M||e.host&&k.length)&&!j&&k.unshift(""),k.length?e.pathname=k.join("/"):(e.pathname=null,e.path=null),r.isNull(e.pathname)&&r.isNull(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},s.prototype.parseHost=function(){var t=this.host,i=a.exec(t);i&&(":"!==(i=i[0])&&(this.port=i.substr(1)),t=t.substr(0,t.length-i.length)),t&&(this.hostname=t)}},70569:function(t){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},17451:function(t,i,e){function n(t){try{if(!e.g.localStorage)return!1}catch(t){return!1}var i=e.g.localStorage[t];return null!=i&&"true"===String(i).toLowerCase()}t.exports=function(t,i){if(n("noDeprecation"))return t;var e=!1;return function(){if(!e){if(n("throwDeprecation"))throw new Error(i);n("traceDeprecation")?console.trace(i):console.warn(i),e=!0}return t.apply(this,arguments)}}},50225:function(t){(function(){var i;t.exports={icon:"icons/google.svg",name:"google",title:"Google Fonts",link:"google.com/fonts",getNames:function(){return i},getLink:function(t){return"https://fonts.google.com/specimen/"+t.replace(/( )/g,"+")},normalizeName:function(t){return t}},i=["ABeeZee","Abel","Abril Fatface","Aclonica","Acme","Actor","Adamina","Advent Pro","Aguafina Script","Akronim","Aladin","Aldrich","Alef","Alegreya","Alegreya SC","Alegreya Sans","Alegreya Sans SC","Alex Brush","Alfa Slab One","Alice","Alike","Alike Angular","Allan","Allerta","Allerta Stencil","Allura","Almendra","Almendra Display","Almendra SC","Amarante","Amaranth","Amatic SC","Amethysta","Amiri","Amita","Anaheim","Andada","Andika","Angkor","Annie Use Your Telescope","Anonymous Pro","Antic","Antic Didone","Antic Slab","Anton","Arapey","Arbutus","Arbutus Slab","Architects Daughter","Archivo Black","Archivo Narrow","Arimo","Arizonia","Armata","Artifika","Arvo","Arya","Asap","Asar","Asset","Astloch","Asul","Atomic Age","Aubrey","Audiowide","Autour One","Average","Average Sans","Averia Gruesa Libre","Averia Libre","Averia Sans Libre","Averia Serif Libre","Bad Script","Balthazar","Bangers","Basic","Battambang","Baumans","Bayon","Belgrano","Belleza","BenchNine","Bentham","Berkshire Swash","Bevan","Bigelow Rules","Bigshot One","Bilbo","Bilbo Swash Caps","Biryani","Bitter","Black Ops One","Bokor","Bonbon","Boogaloo","Bowlby One","Bowlby One SC","Brawler","Bree Serif","Bubblegum Sans","Bubbler One","Buda","Buenard","Butcherman","Butterfly Kids","Cabin","Cabin Condensed","Cabin Sketch","Caesar Dressing","Cagliostro","Calligraffitti","Cambay","Cambo","Candal","Cantarell","Cantata One","Cantora One","Capriola","Cardo","Carme","Carrois Gothic","Carrois Gothic SC","Carter One","Catamaran","Caudex","Caveat","Caveat Brush","Cedarville Cursive","Ceviche One","Changa One","Chango","Chau Philomene One","Chela One","Chelsea Market","Chenla","Cherry Cream Soda","Cherry Swash","Chewy","Chicle","Chivo","Chonburi","Cinzel","Cinzel Decorative","Clicker Script","Coda","Coda Caption","Codystar","Combo","Comfortaa","Coming Soon","Concert One","Condiment","Content","Contrail One","Convergence","Cookie","Copse","Corben","Courgette","Cousine","Coustard","Covered By Your Grace","Crafty Girls","Creepster","Crete Round","Crimson Text","Croissant One","Crushed","Cuprum","Cutive","Cutive Mono","Damion","Dancing Script","Dangrek","Dawning of a New Day","Days One","Dekko","Delius","Delius Swash Caps","Delius Unicase","Della Respira","Denk One","Devonshire","Dhurjati","Didact Gothic","Diplomata","Diplomata SC","Domine","Donegal One","Doppio One","Dorsa","Dosis","Dr Sugiyama","Droid Sans","Droid Sans Mono","Droid Serif","Duru Sans","Dynalight","EB Garamond","Eagle Lake","Eater","Economica","Eczar","Ek Mukta","Electrolize","Elsie","Elsie Swash Caps","Emblema One","Emilys Candy","Engagement","Englebert","Enriqueta","Erica One","Esteban","Euphoria Script","Ewert","Exo","Exo 2","Expletus Sans","Fanwood Text","Fascinate","Fascinate Inline","Faster One","Fasthand","Fauna One","Federant","Federo","Felipa","Fenix","Finger Paint","Fira Mono","Fira Sans","Fjalla One","Fjord One","Flamenco","Flavors","Fondamento","Fontdiner Swanky","Forum","Francois One","Freckle Face","Fredericka the Great","Fredoka One","Freehand","Fresca","Frijole","Fruktur","Fugaz One","GFS Didot","GFS Neohellenic","Gabriela","Gafata","Galdeano","Galindo","Gentium Basic","Gentium Book Basic","Geo","Geostar","Geostar Fill","Germania One","Gidugu","Gilda Display","Give You Glory","Glass Antiqua","Glegoo","Gloria Hallelujah","Goblin One","Gochi Hand","Gorditas","Goudy Bookletter 1911","Graduate","Grand Hotel","Gravitas One","Great Vibes","Griffy","Gruppo","Gudea","Gurajada","Habibi","Halant","Hammersmith One","Hanalei","Hanalei Fill","Handlee","Hanuman","Happy Monkey","Headland One","Henny Penny","Herr Von Muellerhoff","Hind","Hind Siliguri","Hind Vadodara","Holtwood One SC","Homemade Apple","Homenaje","IM Fell DW Pica","IM Fell DW Pica SC","IM Fell Double Pica","IM Fell Double Pica SC","IM Fell English","IM Fell English SC","IM Fell French Canon","IM Fell French Canon SC","IM Fell Great Primer","IM Fell Great Primer SC","Iceberg","Iceland","Imprima","Inconsolata","Inder","Indie Flower","Inika","Inknut Antiqua","Irish Grover","Istok Web","Italiana","Italianno","Itim","Jacques Francois","Jacques Francois Shadow","Jaldi","Jim Nightshade","Jockey One","Jolly Lodger","Josefin Sans","Josefin Slab","Joti One","Judson","Julee","Julius Sans One","Junge","Jura","Just Another Hand","Just Me Again Down Here","Kadwa","Kalam","Kameron","Kantumruy","Karla","Karma","Kaushan Script","Kavoon","Kdam Thmor","Keania One","Kelly Slab","Kenia","Khand","Khmer","Khula","Kite One","Knewave","Kotta One","Koulen","Kranky","Kreon","Kristi","Krona One","Kurale","La Belle Aurore","Laila","Lakki Reddy","Lancelot","Lateef","Lato","League Script","Leckerli One","Ledger","Lekton","Lemon","Libre Baskerville","Life Savers","Lilita One","Lily Script One","Limelight","Linden Hill","Lobster","Lobster Two","Londrina Outline","Londrina Shadow","Londrina Sketch","Londrina Solid","Lora","Love Ya Like A Sister","Loved by the King","Lovers Quarrel","Luckiest Guy","Lusitana","Lustria","Macondo","Macondo Swash Caps","Magra","Maiden Orange","Mako","Mallanna","Mandali","Marcellus","Marcellus SC","Marck Script","Margarine","Marko One","Marmelad","Martel","Martel Sans","Marvel","Mate","Mate SC","Maven Pro","McLaren","Meddon","MedievalSharp","Medula One","Megrim","Meie Script","Merienda","Merienda One","Merriweather","Merriweather Sans","Metal","Metal Mania","Metamorphous","Metrophobic","Michroma","Milonga","Miltonian","Miltonian Tattoo","Miniver","Miss Fajardose","Modak","Modern Antiqua","Molengo","Molle","Monda","Monofett","Monoton","Monsieur La Doulaise","Montaga","Montez","Montserrat","Montserrat Alternates","Montserrat Subrayada","Moul","Moulpali","Mountains of Christmas","Mouse Memoirs","Mr Bedfort","Mr Dafoe","Mr De Haviland","Mrs Saint Delafield","Mrs Sheppards","Muli","Mystery Quest","NTR","Neucha","Neuton","New Rocker","News Cycle","Niconne","Nixie One","Nobile","Nokora","Norican","Nosifer","Nothing You Could Do","Noticia Text","Noto Sans","Noto Serif","Nova Cut","Nova Flat","Nova Mono","Nova Oval","Nova Round","Nova Script","Nova Slim","Nova Square","Numans","Nunito","Odor Mean Chey","Offside","Old Standard TT","Oldenburg","Oleo Script","Oleo Script Swash Caps","Open Sans","Open Sans Condensed","Oranienbaum","Orbitron","Oregano","Orienta","Original Surfer","Oswald","Over the Rainbow","Overlock","Overlock SC","Ovo","Oxygen","Oxygen Mono","PT Mono","PT Sans","PT Sans Caption","PT Sans Narrow","PT Serif","PT Serif Caption","Pacifico","Palanquin","Palanquin Dark","Paprika","Parisienne","Passero One","Passion One","Pathway Gothic One","Patrick Hand","Patrick Hand SC","Patua One","Paytone One","Peddana","Peralta","Permanent Marker","Petit Formal Script","Petrona","Philosopher","Piedra","Pinyon Script","Pirata One","Plaster","Play","Playball","Playfair Display","Playfair Display SC","Podkova","Poiret One","Poller One","Poly","Pompiere","Pontano Sans","Poppins","Port Lligat Sans","Port Lligat Slab","Pragati Narrow","Prata","Preahvihear","Press Start 2P","Princess Sofia","Prociono","Prosto One","Puritan","Purple Purse","Quando","Quantico","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Quintessential","Qwigley","Racing Sans One","Radley","Rajdhani","Raleway","Raleway Dots","Ramabhadra","Ramaraja","Rambla","Rammetto One","Ranchers","Rancho","Ranga","Rationale","Ravi Prakash","Redressed","Reenie Beanie","Revalia","Rhodium Libre","Ribeye","Ribeye Marrow","Righteous","Risque","Roboto","Roboto Condensed","Roboto Mono","Roboto Slab","Rochester","Rock Salt","Rokkitt","Romanesco","Ropa Sans","Rosario","Rosarivo","Rouge Script","Rozha One","Rubik","Rubik Mono One","Rubik One","Ruda","Rufina","Ruge Boogie","Ruluko","Rum Raisin","Ruslan Display","Russo One","Ruthie","Rye","Sacramento","Sahitya","Sail","Salsa","Sanchez","Sancreek","Sansita One","Sarala","Sarina","Sarpanch","Satisfy","Scada","Scheherazade","Schoolbell","Seaweed Script","Sevillana","Seymour One","Shadows Into Light","Shadows Into Light Two","Shanti","Share","Share Tech","Share Tech Mono","Shojumaru","Short Stack","Siemreap","Sigmar One","Signika","Signika Negative","Simonetta","Sintony","Sirin Stencil","Six Caps","Skranji","Slabo 13px","Slabo 27px","Slackey","Smokum","Smythe","Sniglet","Snippet","Snowburst One","Sofadi One","Sofia","Sonsie One","Sorts Mill Goudy","Source Code Pro","Source Sans Pro","Source Serif Pro","Special Elite","Spicy Rice","Spinnaker","Spirax","Squada One","Sree Krushnadevaraya","Stalemate","Stalinist One","Stardos Stencil","Stint Ultra Condensed","Stint Ultra Expanded","Stoke","Strait","Sue Ellen Francisco","Sumana","Sunshiney","Supermercado One","Sura","Suranna","Suravaram","Suwannaphum","Swanky and Moo Moo","Syncopate","Tangerine","Taprom","Tauri","Teko","Telex","Tenali Ramakrishna","Tenor Sans","Text Me One","The Girl Next Door","Tienne","Tillana","Timmana","Tinos","Titan One","Titillium Web","Trade Winds","Trocchi","Trochut","Trykker","Tulpen One","Ubuntu","Ubuntu Condensed","Ubuntu Mono","Ultra","Uncial Antiqua","Underdog","Unica One","UnifrakturCook","UnifrakturMaguntia","Unkempt","Unlock","Unna","VT323","Vampiro One","Varela","Varela Round","Vast Shadow","Vesper Libre","Vibur","Vidaloka","Viga","Voces","Volkhov","Vollkorn","Voltaire","Waiting for the Sunrise","Wallpoet","Walter Turncoat","Warnes","Wellfleet","Wendy One","Wire One","Work Sans","Yanone Kaffeesatz","Yantramanav","Yellowtail","Yeseva One","Yesteryear","Zeyada"]}).call(this)},99976:function(t){"use strict";t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}},7372:function(t,i,e){"use strict";function n(t){var i=this;if(i instanceof n||(i=new n),i.tail=null,i.head=null,i.length=0,t&&"function"==typeof t.forEach)t.forEach((function(t){i.push(t)}));else if(arguments.length>0)for(var e=0,r=arguments.length;e1)e=i;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,e=this.head.value}for(var r=0;null!==n;r++)e=t(e,n.value,r),n=n.next;return e},n.prototype.reduceReverse=function(t,i){var e,n=this.tail;if(arguments.length>1)e=i;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,e=this.tail.value}for(var r=this.length-1;null!==n;r--)e=t(e,n.value,r),n=n.prev;return e},n.prototype.toArray=function(){for(var t=new Array(this.length),i=0,e=this.head;null!==e;i++)t[i]=e.value,e=e.next;return t},n.prototype.toArrayReverse=function(){for(var t=new Array(this.length),i=0,e=this.tail;null!==e;i++)t[i]=e.value,e=e.prev;return t},n.prototype.slice=function(t,i){(i=i||this.length)<0&&(i+=this.length),(t=t||0)<0&&(t+=this.length);var e=new n;if(ithis.length&&(i=this.length);for(var r=0,s=this.head;null!==s&&rthis.length&&(i=this.length);for(var r=this.length,s=this.tail;null!==s&&r>i;r--)s=s.prev;for(;null!==s&&r>t;r--,s=s.prev)e.push(s.value);return e},n.prototype.splice=function(t,i,...e){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var n=0,s=this.head;null!==s&&n0;)this.pop()},i.prototype.extend=function(t){for(var i=0,e=t.length;ithis.Bt||Math.abs(t.clientY-this.qt.clientY)>this.Bt},i.prototype.disposeInternal=function(){this.Yt&&((0,v.bN)(this.Yt),this.Yt=null),this.$t.removeEventListener(o.Z.TOUCHMOVE,this.Jt),this.Wt&&((0,v.bN)(this.Wt),this.Wt=null),this.Gt.forEach(v.bN),this.Gt.length=0,this.$t=null,t.prototype.disposeInternal.call(this)},i}(c.Z),m=e(72067),y=e(91964),g=e(78637),b=e(36874),w=e(3520),M=e(98114),x=e(29123),k=e(89500),S=e(44812),E=e(97854),T=e(85409),_=e(62896),A=e(73926),O=e(70956);var j=function(t){function i(i){t.call(this),this.on,this.once,this.un;var e=function(t){var i=null;void 0!==t.keyboardEventTarget&&(i="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);var e,n,s,o={},u=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new a.Z({layers:t.layers});o[g.Z.LAYERGROUP]=u,o[g.Z.TARGET]=t.target,o[g.Z.VIEW]=void 0!==t.view?t.view:new x.ZP,void 0!==t.controls&&(Array.isArray(t.controls)?e=new r.Z(t.controls.slice()):((0,E.h)("function"==typeof t.controls.getArray,47),e=t.controls));void 0!==t.interactions&&(Array.isArray(t.interactions)?n=new r.Z(t.interactions.slice()):((0,E.h)("function"==typeof t.interactions.getArray,48),n=t.interactions));void 0!==t.overlays?Array.isArray(t.overlays)?s=new r.Z(t.overlays.slice()):((0,E.h)("function"==typeof t.overlays.getArray,49),s=t.overlays):s=new r.Z;return{controls:e,interactions:n,keyboardEventTarget:i,overlays:s,values:o}}(i);this.oi=this.handleBrowserEvent.bind(this),this.ai=void 0!==i.maxTilesLoading?i.maxTilesLoading:16,this.Et=void 0!==i.pixelRatio?i.pixelRatio:l.MP,this.ui,this.hi,this.fi=function(){this.hi=void 0,this.ci(Date.now())}.bind(this),this.li=(0,S.Ue)(),this.di=(0,S.Ue)(),this.vi=0,this.yi=null,this.gi=null,this.bi=null,this.wi=null,this.Mi=null,this.xi=document.createElement("div"),this.xi.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.xi.style.position="relative",this.xi.style.overflow="hidden",this.xi.style.width="100%",this.xi.style.height="100%",this.ki=document.createElement("div"),this.ki.style.position="absolute",this.ki.style.zIndex="0",this.ki.style.width="100%",this.ki.style.height="100%",this.ki.style.pointerEvents="none",this.ki.className="ol-overlaycontainer",this.xi.appendChild(this.ki),this.Si=document.createElement("div"),this.Si.style.position="absolute",this.Si.style.zIndex="0",this.Si.style.width="100%",this.Si.style.height="100%",this.Si.style.pointerEvents="none",this.Si.className="ol-overlaycontainer-stopevent",this.xi.appendChild(this.Si),this.Ti=null,this.Bt=i.moveTolerance,this._i=e.keyboardEventTarget,this.Ai=null,this.controls=e.controls||new r.Z,this.interactions=e.interactions||new r.Z,this.Oi=e.overlays,this.ji={},this.Ci=null,this.Ii,this.Ri=[],this.Pi=new M.Z(this.getTilePriority.bind(this),this.Ni.bind(this)),this.addChangeListener(g.Z.LAYERGROUP,this.Di),this.addChangeListener(g.Z.VIEW,this.Li),this.addChangeListener(g.Z.SIZE,this.zi),this.addChangeListener(g.Z.TARGET,this.Ui),this.setProperties(e.values),this.controls.addEventListener(s.Z.ADD,function(t){t.element.setMap(this)}.bind(this)),this.controls.addEventListener(s.Z.REMOVE,function(t){t.element.setMap(null)}.bind(this)),this.interactions.addEventListener(s.Z.ADD,function(t){t.element.setMap(this)}.bind(this)),this.interactions.addEventListener(s.Z.REMOVE,function(t){t.element.setMap(null)}.bind(this)),this.Oi.addEventListener(s.Z.ADD,function(t){this.Gi(t.element)}.bind(this)),this.Oi.addEventListener(s.Z.REMOVE,function(t){var i=t.element.getId();void 0!==i&&delete this.ji[i.toString()],t.element.setMap(null)}.bind(this)),this.controls.forEach(function(t){t.setMap(this)}.bind(this)),this.interactions.forEach(function(t){t.setMap(this)}.bind(this)),this.Oi.forEach(this.Gi.bind(this))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},i.prototype.addControl=function(t){this.getControls().push(t)},i.prototype.addInteraction=function(t){this.getInteractions().push(t)},i.prototype.addLayer=function(t){this.getLayerGroup().getLayers().push(t)},i.prototype.addOverlay=function(t){this.getOverlays().push(t)},i.prototype.Gi=function(t){var i=t.getId();void 0!==i&&(this.ji[i.toString()]=t),t.setMap(this)},i.prototype.disposeInternal=function(){this.setTarget(null),t.prototype.disposeInternal.call(this)},i.prototype.forEachFeatureAtPixel=function(t,i,e){if(this.yi){var n=this.getCoordinateFromPixelInternal(t),r=void 0!==(e=void 0!==e?e:{}).hitTolerance?e.hitTolerance:0,s=void 0!==e.layerFilter?e.layerFilter:d.uX,o=!1!==e.checkWrapped;return this.Ci.forEachFeatureAtCoordinate(n,this.yi,r,o,i,null,s,null)}},i.prototype.getFeaturesAtPixel=function(t,i){var e=[];return this.forEachFeatureAtPixel(t,(function(t){e.push(t)}),i),e},i.prototype.forEachLayerAtPixel=function(t,i,e){if(this.yi){var n=e||{},r=void 0!==n.hitTolerance?n.hitTolerance:0,s=n.layerFilter||d.uX;return this.Ci.forEachLayerAtPixel(t,this.yi,r,i,s)}},i.prototype.hasFeatureAtPixel=function(t,i){if(!this.yi)return!1;var e=this.getCoordinateFromPixelInternal(t),n=void 0!==(i=void 0!==i?i:{}).layerFilter?i.layerFilter:d.uX,r=void 0!==i.hitTolerance?i.hitTolerance:0,s=!1!==i.checkWrapped;return this.Ci.hasFeatureAtCoordinate(e,this.yi,r,s,n,null)},i.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},i.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},i.prototype.getEventPixel=function(t){var i=this.xi.getBoundingClientRect(),e="changedTouches"in t?t.changedTouches[0]:t;return[e.clientX-i.left,e.clientY-i.top]},i.prototype.getTarget=function(){return this.get(g.Z.TARGET)},i.prototype.getTargetElement=function(){var t=this.getTarget();return void 0!==t?"string"==typeof t?document.getElementById(t):t:null},i.prototype.getCoordinateFromPixel=function(t){return(0,_.lO)(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},i.prototype.getCoordinateFromPixelInternal=function(t){var i=this.yi;return i?(0,S.nn)(i.pixelToCoordinateTransform,t.slice()):null},i.prototype.getControls=function(){return this.controls},i.prototype.getOverlays=function(){return this.Oi},i.prototype.getOverlayById=function(t){var i=this.ji[t.toString()];return void 0!==i?i:null},i.prototype.getInteractions=function(){return this.interactions},i.prototype.getLayerGroup=function(){return this.get(g.Z.LAYERGROUP)},i.prototype.getLayers=function(){return this.getLayerGroup().getLayers()},i.prototype.getLoading=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),i=0,e=t.length;i=0;u--){var h=a[u];if(h.getMap()===this&&h.getActive()&&this.getTargetElement())if(!h.handleEvent(t)||t.propagationStopped)break}}},i.prototype.handlePostRender=function(){var t=this.yi,i=this.Pi;if(!i.isEmpty()){var e=this.ai,n=e;if(t){var r=t.viewHints;if(r[k.Z.ANIMATING]||r[k.Z.INTERACTING]){var s=Date.now()-t.time>8;e=s?0:8,n=s?0:2}}i.getTilesLoading()t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},i.prototype.load=function(){(0,o.O3)()},i.prototype.getAlpha=function(t,i){if(!this.Zi)return 1;var e=this.$i[t];if(e){if(-1===e)return 1}else e=i,this.$i[t]=e;var n=i-e+1e3/60;return n>=this.Zi?1:(0,a.YQ)(n/this.Zi)},i.prototype.inTransition=function(t){return!!this.Zi&&-1!==this.$i[t]},i.prototype.endTransition=function(t){this.Zi&&(this.$i[t]=-1)},i}(n.Z);i.Z=u},38189:function(t,i,e){"use strict";var n=e(68200),r=e(10056),s=function(t){function i(){t.apply(this,arguments)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.expireCache=function(t){for(;this.canExpireCache();){if(this.peekLast().getKey()in t)break;this.pop().release()}},i.prototype.pruneExceptNewestZ=function(){if(0!==this.getCount()){var t=this.peekFirstKey(),i=(0,r.Ul)(t)[0];this.forEach(function(t){t.tileCoord[0]!==i&&(this.remove((0,r.km)(t.tileCoord)),t.release())}.bind(this))}},i}(n.Z);i.Z=s},98114:function(t,i,e){"use strict";e.d(i,{Z:function(){return f},R:function(){return c}});var n=e(79021),r=e(97854),s=e(79309),o=1/0,a=function(t,i){this.Wi=t,this.Hi=i,this.Ki=[],this.Yi=[],this.Xi={}};a.prototype.clear=function(){this.Ki.length=0,this.Yi.length=0,(0,s.ZH)(this.Xi)},a.prototype.dequeue=function(){var t=this.Ki,i=this.Yi,e=t[0];1==t.length?(t.length=0,i.length=0):(t[0]=t.pop(),i[0]=i.pop(),this.Ji(0));var n=this.Hi(e);return delete this.Xi[n],e},a.prototype.enqueue=function(t){(0,r.h)(!(this.Hi(t)in this.Xi),31);var i=this.Wi(t);return i!=o&&(this.Ki.push(t),this.Yi.push(i),this.Xi[this.Hi(t)]=!0,this.te(0,this.Ki.length-1),!0)},a.prototype.getCount=function(){return this.Ki.length},a.prototype.ie=function(t){return 2*t+1},a.prototype.ee=function(t){return 2*t+2},a.prototype.ne=function(t){return t-1>>1},a.prototype.re=function(){var t;for(t=(this.Ki.length>>1)-1;t>=0;t--)this.Ji(t)},a.prototype.isEmpty=function(){return 0===this.Ki.length},a.prototype.isKeyQueued=function(t){return t in this.Xi},a.prototype.isQueued=function(t){return this.isKeyQueued(this.Hi(t))},a.prototype.Ji=function(t){for(var i=this.Ki,e=this.Yi,n=i.length,r=i[t],s=e[t],o=t;t>1;){var a=this.ie(t),u=this.ee(t),h=ut;){var o=this.ne(i);if(!(n[o]>s))break;e[i]=e[o],n[i]=n[o],i=o}e[i]=r,n[i]=s},a.prototype.reprioritize=function(){var t,i,e,n=this.Wi,r=this.Ki,s=this.Yi,a=0,u=r.length;for(i=0;i0;)n=(e=this.dequeue()[0]).getKey(),e.getState()!==h.Z.IDLE||n in this.he||(this.he[n]=!0,++this.ue,++r,e.load())},i}(u);function c(t,i,e,n,r){if(!t||!(e in t.wantedTiles))return o;if(!t.wantedTiles[e][i.getKey()])return o;var s=t.viewState.center,a=n[0]-s[0],u=n[1]-s[1];return 65536*Math.log(r)+Math.sqrt(a*a+u*u)/r}},5891:function(t,i,e){"use strict";e.d(i,{T:function(){return r}});var n=function(t,i,e,n){this.minX=t,this.maxX=i,this.minY=e,this.maxY=n};function r(t,i,e,r,s){return void 0!==s?(s.minX=t,s.maxX=i,s.minY=e,s.maxY=r,s):new n(t,i,e,r)}n.prototype.contains=function(t){return this.containsXY(t[1],t[2])},n.prototype.containsTileRange=function(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY},n.prototype.containsXY=function(t,i){return this.minX<=t&&t<=this.maxX&&this.minY<=i&&i<=this.maxY},n.prototype.equals=function(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY},n.prototype.extend=function(t){t.minXthis.maxX&&(this.maxX=t.maxX),t.minYthis.maxY&&(this.maxY=t.maxY)},n.prototype.getHeight=function(){return this.maxY-this.minY+1},n.prototype.getSize=function(){return[this.getWidth(),this.getHeight()]},n.prototype.getWidth=function(){return this.maxX-this.minX+1},n.prototype.intersects=function(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY},i.Z=n},20380:function(t,i){"use strict";i.Z={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4}},29123:function(t,i,e){"use strict";e.d(i,{ZP:function(){return A}});var n=e(912),r=e(32431),s=e(37201),o=e(89500),a=e(1977),u=e(85711),h=e(62896),f=e(51287),c=e(22942),l=e(97854),d=e(79309),v=e(215);function p(t,i,e){return function(n,r,s,o,a){if(n){var u=i?0:s[0]*r,h=i?0:s[1]*r,f=a?a[0]:0,c=a?a[1]:0,l=t[0]+u/2+f,d=t[2]-u/2+f,p=t[1]+h/2+c,m=t[3]-h/2+c;l>d&&(d=l=(d+l)/2),p>m&&(m=p=(m+p)/2);var y=(0,v.uZ)(n[0],l,d),g=(0,v.uZ)(n[1],p,m),b=30*r;return o&&e&&(y+=-b*Math.log(1+Math.max(0,l-n[0])/b)+b*Math.log(1+Math.max(0,n[0]-d)/b),g+=-b*Math.log(1+Math.max(0,p-n[1])/b)+b*Math.log(1+Math.max(0,n[1]-m)/b)),[y,g]}}}function m(t){return t}var y=e(85409),g=e(95083);function b(t,i,e,n){var r=(0,y.dz)(i)/e[0],s=(0,y.Cr)(i)/e[1];return n?Math.min(t,Math.max(r,s)):Math.min(t,Math.min(r,s))}function w(t,i,e){var n=Math.min(t,i);return n*=Math.log(1+50*Math.max(0,t/i-1))/50+1,e&&(n=Math.max(n,e),n/=Math.log(1+50*Math.max(0,e/t-1))/50+1),(0,v.uZ)(n,e/2,2*i)}function M(t,i,e,n,r){return function(s,o,a,u){if(void 0!==s){var h=n?b(t,n,a,r):t;return(void 0===e||e)&&u?w(s,h,i):(0,v.uZ)(s,i,h)}}}var x=e(34958),k=e(85832),S=e(60392);function E(t,i){setTimeout((function(){t(i)}),0)}function T(t){return!(t.sourceCenter&&t.targetCenter&&!(0,c.fS)(t.sourceCenter,t.targetCenter))&&(t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation)}function _(t,i,e,n,r){var s=Math.cos(-r),o=Math.sin(-r),a=t[0]*s-t[1]*o,u=t[1]*s+t[0]*o;return[(a+=(i[0]/2-e[0])*n)*s-(u+=(e[1]-i[1]/2)*n)*(o=-o),u*s+a*o]}var A=function(t){function i(i){t.call(this),this.on,this.once,this.un;var e=(0,d.f0)({},i);this.fe=[0,0],this.le=[],this.de,this.ve=(0,h.UQ)(e.projection,"EPSG:3857"),this.pe=[100,100],this.me=null,this.ye,this.ge,this.be=void 0,e.center&&(e.center=(0,h.Vs)(e.center,this.ve)),e.extent&&(e.extent=(0,h.dY)(e.extent,this.ve)),this.we(e)}t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i;var e={padding:{configurable:!0}};return i.prototype.we=function(t){var i=function(t){var i,e,n,r=28,o=2,a=void 0!==t.minZoom?t.minZoom:0,f=void 0!==t.maxZoom?t.maxZoom:r,c=void 0!==t.zoomFactor?t.zoomFactor:o,l=void 0!==t.multiWorld&&t.multiWorld,d=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,p=void 0!==t.showFullExtent&&t.showFullExtent,m=(0,h.UQ)(t.projection,"EPSG:3857"),x=m.getExtent(),k=t.constrainOnlyCenter,S=t.extent;l||S||!m.isGlobal()||(k=!1,S=x);if(void 0!==t.resolutions){var E=t.resolutions;e=E[a],n=void 0!==E[f]?E[f]:E[E.length-1],i=t.constrainResolution?function(t,i,e,n){return function(r,s,o,a){if(void 0!==r){var u=t[0],h=t[t.length-1],f=e?b(u,e,o,n):u;if(a)return void 0===i||i?w(r,f,h):(0,v.uZ)(r,h,f);var c=Math.min(f,r),l=Math.floor((0,g.h7)(t,c,s));return t[l]>f&&l1&&"function"==typeof arguments[n-1]&&(i=arguments[n-1],--n),!this.isDef()){var r=arguments[n-1];return r.center&&this.setCenterInternal(r.center),void 0!==r.zoom&&this.setZoom(r.zoom),void 0!==r.rotation&&this.setRotation(r.rotation),void(i&&E(i,!0))}for(var s=Date.now(),a=this.me.slice(),u=this.ye,h=this.ge,f=[],c=0;c0},i.prototype.getInteracting=function(){return this.fe[o.Z.INTERACTING]>0},i.prototype.cancelAnimations=function(){var t;this.setHint(o.Z.ANIMATING,-this.fe[o.Z.ANIMATING]);for(var i=0,e=this.le.length;i=0;--e){for(var n=this.le[e],r=!0,s=0,a=n.length;s0?h/u.duration:1;f>=1?(u.complete=!0,f=1):r=!1;var c=u.easing(f);if(u.sourceCenter){var l=u.sourceCenter[0],d=u.sourceCenter[1],p=l+c*(u.targetCenter[0]-l),m=d+c*(u.targetCenter[1]-d);this.me=[p,m]}if(u.sourceResolution&&u.targetResolution){var y=1===c?u.targetResolution:u.sourceResolution+c*(u.targetResolution-u.sourceResolution);if(u.anchor){var g=this.De(this.getRotation()),b=this.je.resolution(y,0,g,!0);this.me=this.calculateCenterZoom(b,u.anchor)}this.ye=y,this.Le(!0)}if(void 0!==u.sourceRotation&&void 0!==u.targetRotation){var w=1===c?(0,v.$W)(u.targetRotation+Math.PI,2*Math.PI)-Math.PI:u.sourceRotation+c*(u.targetRotation-u.sourceRotation);if(u.anchor){var M=this.je.rotation(w,!0);this.me=this.calculateCenterRotate(M,u.anchor)}this.ge=w}if(this.Le(!0),i=!0,!u.complete)break}}if(r){this.le[e]=null,this.setHint(o.Z.ANIMATING,-1);var x=n[0].callback;x&&E(x,!0)}}this.le=this.le.filter(Boolean),i&&void 0===this.de&&(this.de=requestAnimationFrame(this.Pe.bind(this)))}},i.prototype.calculateCenterRotate=function(t,i){var e,n=this.getCenterInternal();return void 0!==n&&(e=[n[0]-i[0],n[1]-i[1]],(0,c.U1)(e,t-this.getRotation()),(0,c.IH)(e,i)),e},i.prototype.calculateCenterZoom=function(t,i){var e,n=this.getCenterInternal(),r=this.getResolution();void 0!==n&&void 0!==r&&(e=[i[0]-t*(i[0]-n[0])/r,i[1]-t*(i[1]-n[1])/r]);return e},i.prototype.De=function(t){var i=this.pe;if(t){var e=i[0],n=i[1];return[Math.abs(e*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(e*Math.sin(t))+Math.abs(n*Math.cos(t))]}return i},i.prototype.setViewportSize=function(t){this.pe=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},i.prototype.getCenter=function(){var t=this.getCenterInternal();return t?(0,h.lO)(t,this.getProjection()):t},i.prototype.getCenterInternal=function(){return this.get(a.Z.CENTER)},i.prototype.getConstraints=function(){return this.je},i.prototype.getConstrainResolution=function(){return this.Ie.constrainResolution},i.prototype.getHints=function(t){return void 0!==t?(t[0]=this.fe[0],t[1]=this.fe[1],t):this.fe.slice()},i.prototype.calculateExtent=function(t){var i=this.calculateExtentInternal(t);return(0,h.Fj)(i,this.getProjection())},i.prototype.calculateExtentInternal=function(t){var i=t||this.Fe(),e=this.getCenterInternal();(0,l.h)(e,1);var n=this.getResolution();(0,l.h)(void 0!==n,2);var r=this.getRotation();return(0,l.h)(void 0!==r,3),(0,y.p8)(e,n,r,i)},i.prototype.getMaxResolution=function(){return this.xe},i.prototype.getMinResolution=function(){return this.Se},i.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.Se)},i.prototype.setMaxZoom=function(t){this.we(this.Re({maxZoom:t}))},i.prototype.getMinZoom=function(){return this.getZoomForResolution(this.xe)},i.prototype.setMinZoom=function(t){this.we(this.Re({minZoom:t}))},i.prototype.setConstrainResolution=function(t){this.we(this.Re({constrainResolution:t}))},i.prototype.getProjection=function(){return this.ve},i.prototype.getResolution=function(){return this.get(a.Z.RESOLUTION)},i.prototype.getResolutions=function(){return this.Te},i.prototype.getResolutionForExtent=function(t,i){return this.getResolutionForExtentInternal((0,h.dY)(t,this.getProjection()),i)},i.prototype.getResolutionForExtentInternal=function(t,i){var e=i||this.Fe(),n=(0,y.dz)(t)/e[0],r=(0,y.Cr)(t)/e[1];return Math.max(n,r)},i.prototype.getResolutionForValueFunction=function(t){var i=t||2,e=this.getConstrainedResolution(this.xe),n=this.Se,r=Math.log(e/n)/Math.log(i);return function(t){return e/Math.pow(i,t*r)}},i.prototype.getRotation=function(){return this.get(a.Z.ROTATION)},i.prototype.getValueForResolutionFunction=function(t){var i=Math.log(t||2),e=this.getConstrainedResolution(this.xe),n=this.Se,r=Math.log(e/n)/i;return function(t){return Math.log(e/t)/i/r}},i.prototype.Fe=function(t){var i=this.De(t),e=this._e;return e&&(i=[i[0]-e[1]-e[3],i[1]-e[0]-e[2]]),i},i.prototype.getState=function(){var t=this.getProjection(),i=this.getResolution(),e=this.getRotation(),n=this.getCenterInternal(),r=this._e;if(r){var s=this.Fe();n=_(n,this.De(),[s[0]/2+r[3],s[1]/2+r[0]],i,e)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:i,rotation:e,zoom:this.getZoom()}},i.prototype.getZoom=function(){var t,i=this.getResolution();return void 0!==i&&(t=this.getZoomForResolution(i)),t},i.prototype.getZoomForResolution=function(t){var i,e,n=this.Oe||0;if(this.Te){var r=(0,g.h7)(this.Te,t,1);n=r,i=this.Te[r],e=r==this.Te.length-1?2:i/this.Te[r+1]}else i=this.xe,e=this.Ee;return n+Math.log(i/t)/Math.log(e)},i.prototype.getResolutionForZoom=function(t){if(this.Te){if(this.Te.length<=1)return 0;var i=(0,v.uZ)(Math.floor(t),0,this.Te.length-2),e=this.Te[i]/this.Te[i+1];return this.Te[i]/Math.pow(e,(0,v.uZ)(t-i,0,1))}return this.xe/Math.pow(this.Ee,t-this.Oe)},i.prototype.fit=function(t,i){var e;if((0,l.h)(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,24),Array.isArray(t)){(0,l.h)(!(0,y.xb)(t),25);var n=(0,h.dY)(t,this.getProjection());e=(0,S.oJ)(n)}else if(t.getType()===r.Z.CIRCLE){var s=(0,h.dY)(t.getExtent(),this.getProjection());(e=(0,S.oJ)(s)).rotate(this.getRotation(),(0,y.qg)(s))}else{var o=(0,h.Cs)();e=o?t.clone().transform(o,this.getProjection()):t}this.fitInternal(e,i)},i.prototype.rotatedExtentForGeometry=function(t){for(var i=this.getRotation(),e=Math.cos(i),n=Math.sin(-i),r=t.getFlatCoordinates(),s=t.getStride(),o=1/0,a=1/0,u=-1/0,h=-1/0,f=0,c=r.length;f>1)],i))<0?a=n+1:(u=n,h=!s);return h?a:~a}function r(t,i){return t>i?1:t=0}function o(t,i,e){var n,r=t.length;if(t[0]<=i)return 0;if(i<=t[r-1])return r-1;if(e>0){for(n=1;n0?n-1:n:t[n-1]-i>>0,r=0;r0||e&&0===s)}))}e.d(i,{ry:function(){return n},kK:function(){return r},q9:function(){return s},h7:function(){return o},FZ:function(){return a},l7:function(){return u},sE:function(){return h},fS:function(){return f},cx:function(){return c},pT:function(){return l}})},97854:function(t,i,e){"use strict";e.d(i,{h:function(){return r}});var n=e(57919);function r(t,i){if(!t)throw new n.Z(i)}},7492:function(t,i,e){"use strict";e.d(i,{XC:function(){return a},_2:function(){return l},BB:function(){return v},e1:function(){return p}});var n=e(97854),r=e(215),s=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,o=/^([a-z]*)$|^hsla?\(.*\)$/i;function a(t){return"string"==typeof t?t:v(t)}function u(t){var i=document.createElement("div");if(i.style.color=t,""!==i.style.color){document.body.appendChild(i);var e=getComputedStyle(i).color;return document.body.removeChild(i),e}return""}var h,f,c=(h={},f=0,function(t){var i;if(h.hasOwnProperty(t))i=h[t];else{if(f>=1024){var e=0;for(var r in h)0==(3&e++)&&(delete h[r],--f)}i=function(t){var i,e,r,a,h;if(o.exec(t)&&(t=u(t)),s.exec(t)){var f,c=t.length-1;f=c<=4?1:2;var l=4===c||8===c;i=parseInt(t.substr(1+0*f,f),16),e=parseInt(t.substr(1+1*f,f),16),r=parseInt(t.substr(1+2*f,f),16),a=l?parseInt(t.substr(1+3*f,f),16):255,1==f&&(i=(i<<4)+i,e=(e<<4)+e,r=(r<<4)+r,l&&(a=(a<<4)+a)),h=[i,e,r,a/255]}else 0==t.indexOf("rgba(")?d(h=t.slice(5,-1).split(",").map(Number)):0==t.indexOf("rgb(")?((h=t.slice(4,-1).split(",").map(Number)).push(1),d(h)):(0,n.h)(!1,14);return h}(t),h[t]=i,++f}return i});function l(t){return Array.isArray(t)?t:c(t)}function d(t){return t[0]=(0,r.uZ)(t[0]+.5|0,0,255),t[1]=(0,r.uZ)(t[1]+.5|0,0,255),t[2]=(0,r.uZ)(t[2]+.5|0,0,255),t[3]=(0,r.uZ)(t[3],0,1),t}function v(t){var i=t[0];i!=(0|i)&&(i=i+.5|0);var e=t[1];e!=(0|e)&&(e=e+.5|0);var n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+i+","+e+","+n+","+(void 0===t[3]?1:t[3])+")"}function p(t){return o.test(t)&&(t=u(t)),s.test(t)||0===t.indexOf("rgba(")||0===t.indexOf("rgb(")}},69019:function(t,i,e){"use strict";e.d(i,{y:function(){return r}});var n=e(7492);function r(t){return Array.isArray(t)?(0,n.BB)(t):t}},61994:function(t,i,e){"use strict";e.d(i,{ce:function(){return c}});var n=e(27688),r=e(54009),s=e(39969),o=e(79021),a=e(78657),u=e(85832),h=function(t){function i(i){var e=i||{};t.call(this,{element:document.createElement("div"),render:e.render,target:e.target});var n=void 0!==e.className?e.className:"ol-rotate",r=void 0!==e.label?e.label:"⇧",s=void 0!==e.compassClassName?e.compassClassName:"ol-compass";this.ze=null,"string"==typeof r?(this.ze=document.createElement("span"),this.ze.className=s,this.ze.textContent=r):(this.ze=r,this.ze.classList.add(s));var u=e.tipLabel?e.tipLabel:"Reset rotation",h=document.createElement("button");h.className=n+"-reset",h.setAttribute("type","button"),h.title=u,h.appendChild(this.ze),h.addEventListener(o.Z.CLICK,this.Ge.bind(this),!1);var f=n+" "+a.XV+" "+a.hg,c=this.element;c.className=f,c.appendChild(h),this.Ze=e.resetNorth?e.resetNorth:void 0,this.$e=void 0!==e.duration?e.duration:250,this.We=void 0===e.autoHide||e.autoHide,this.Ke=void 0,this.We&&this.element.classList.add(a.oj)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.Ge=function(t){t.preventDefault(),void 0!==this.Ze?this.Ze():this.Ye()},i.prototype.Ye=function(){var t=this.getMap().getView();if(t){var i=t.getRotation();void 0!==i&&(this.$e>0&&i%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.$e,easing:u.Vv}):t.setRotation(0))}},i.prototype.render=function(t){var i=t.frameState;if(i){var e=i.viewState.rotation;if(e!=this.Ke){var n="rotate("+e+"rad)";if(this.We){var r=this.element.classList.contains(a.oj);r||0!==e?r&&0!==e&&this.element.classList.remove(a.oj):this.element.classList.add(a.oj)}this.ze.style.transform=n}this.Ke=e}},i}(s.Z),f=function(t){function i(i){var e=i||{};t.call(this,{element:document.createElement("div"),target:e.target});var n=void 0!==e.className?e.className:"ol-zoom",r=void 0!==e.delta?e.delta:1,s=void 0!==e.zoomInClassName?e.zoomInClassName:n+"-in",u=void 0!==e.zoomOutClassName?e.zoomOutClassName:n+"-out",h=void 0!==e.zoomInLabel?e.zoomInLabel:"+",f=void 0!==e.zoomOutLabel?e.zoomOutLabel:"−",c=void 0!==e.zoomInTipLabel?e.zoomInTipLabel:"Zoom in",l=void 0!==e.zoomOutTipLabel?e.zoomOutTipLabel:"Zoom out",d=document.createElement("button");d.className=s,d.setAttribute("type","button"),d.title=c,d.appendChild("string"==typeof h?document.createTextNode(h):h),d.addEventListener(o.Z.CLICK,this.Ge.bind(this,r),!1);var v=document.createElement("button");v.className=u,v.setAttribute("type","button"),v.title=l,v.appendChild("string"==typeof f?document.createTextNode(f):f),v.addEventListener(o.Z.CLICK,this.Ge.bind(this,-r),!1);var p=n+" "+a.XV+" "+a.hg,m=this.element;m.className=p,m.appendChild(d),m.appendChild(v),this.$e=void 0!==e.duration?e.duration:250}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.Ge=function(t,i){i.preventDefault(),this.Xe(t)},i.prototype.Xe=function(t){var i=this.getMap().getView();if(i){var e=i.getZoom();if(void 0!==e){var n=i.getConstrainedZoom(e+t);this.$e>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:n,duration:this.$e,easing:u.Vv})):i.setZoom(n)}}},i}(s.Z);function c(t){var i=t||{},e=new r.Z;return(void 0===i.zoom||i.zoom)&&e.push(new f(i.zoomOptions)),(void 0===i.rotate||i.rotate)&&e.push(new h(i.rotateOptions)),(void 0===i.attribution||i.attribution)&&e.push(new n.Z(i.attributionOptions)),e}},27688:function(t,i,e){"use strict";var n=e(39969),r=e(79021),s=e(78657),o=e(95083),a=e(65851),u=e(70956),h=function(t){function i(i){var e=i||{};t.call(this,{element:document.createElement("div"),render:e.render,target:e.target}),this.Je=document.createElement("ul"),this.Qe=void 0===e.collapsed||e.collapsed,this.tn=this.Qe,this.rn=void 0!==e.collapsible,this.sn=void 0===e.collapsible||e.collapsible,this.sn||(this.Qe=!1);var n=void 0!==e.className?e.className:"ol-attribution",o=void 0!==e.tipLabel?e.tipLabel:"Attributions",a=void 0!==e.expandClassName?e.expandClassName:n+"-expand",u=void 0!==e.collapseLabel?e.collapseLabel:"»",h=void 0!==e.collapseClassName?e.collapseClassName:n+"-collpase";"string"==typeof u?(this.an=document.createElement("span"),this.an.textContent=u,this.an.className=h):this.an=u;var f=void 0!==e.label?e.label:"i";"string"==typeof f?(this.ze=document.createElement("span"),this.ze.textContent=f,this.ze.className=a):this.ze=f;var c=this.sn&&!this.Qe?this.an:this.ze;this.hn=document.createElement("button"),this.hn.setAttribute("type","button"),this.hn.setAttribute("aria-expanded",String(!this.Qe)),this.hn.title=o,this.hn.appendChild(c),this.hn.addEventListener(r.Z.CLICK,this.Ge.bind(this),!1);var l=n+" "+s.XV+" "+s.hg+(this.Qe&&this.sn?" "+s.hN:"")+(this.sn?"":" ol-uncollapsible"),d=this.element;d.className=l,d.appendChild(this.hn),d.appendChild(this.Je),this.fn=[],this.cn=!0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.dn=function(t){for(var i={},e=[],n=!0,r=t.layerStatesArray,s=0,o=r.length;s0;if(this.cn!=e&&(this.element.style.display=e?"":"none",this.cn=e),!(0,o.fS)(i,this.fn)){(0,u.ep)(this.Je);for(var n=0,r=i.length;nf*b||h>c*b?this.Wn():(0,p.r4)(s,n)||this.Yn()}}},i.prototype.Wn=function(){var t=this.getMap(),i=this.Gn,e=t.getSize(),n=t.getView().calculateExtentInternal(e),r=i.getView(),s=Math.log(7.5)/Math.LN2,o=1/(Math.pow(2,s/2)*w);(0,p.H9)(n,o),r.fitInternal((0,y.oJ)(n))},i.prototype.Yn=function(){var t=this.getMap(),i=this.Gn,e=t.getView();i.getView().setCenterInternal(e.getCenterInternal())},i.prototype.Xn=function(){var t=this.getMap(),i=this.Gn;if(t.isRendered()&&i.isRendered()){var e=t.getSize(),n=t.getView(),r=i.getView(),s=this.Dn?0:-n.getRotation(),o=this.Bn,a=this.Bn.getElement(),u=n.getCenterInternal(),h=n.getResolution(),f=r.getResolution(),c=e[0]*h/f,l=e[1]*h/f;if(o.setPosition(u),a){a.style.width=c+"px",a.style.height=l+"px";var d="rotate("+s+"rad)";a.style.transform=d}}},i.prototype.Hn=function(){this.Jn||(this.Jn=(0,m.Vx)(this.Gn,o.Z.POSTRENDER,(function(t){delete this.Jn,this.Xn()}),this))},i.prototype.Ge=function(t){t.preventDefault(),this.pn()},i.prototype.pn=function(){this.element.classList.toggle(v.hN),this.Qe?(0,g.$H)(this.an,this.ze):(0,g.$H)(this.ze,this.an),this.Qe=!this.Qe;var t=this.Gn;if(!this.Qe){if(t.isRendered())return this.Ln=void 0,void t.render();t.updateSize(),this.Wn(),this.Hn()}},i.prototype.getCollapsible=function(){return this.sn},i.prototype.setCollapsible=function(t){this.sn!==t&&(this.sn=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.Qe&&this.pn())},i.prototype.setCollapsed=function(t){this.sn&&this.Qe!==t&&this.pn()},i.prototype.getCollapsed=function(){return this.Qe},i.prototype.getRotateWithView=function(){return this.Dn},i.prototype.setRotateWithView=function(t){this.Dn!==t&&(this.Dn=t,0!==this.getMap().getView().getRotation()&&(this.Dn?this.Nn():this.Gn.getView().setRotation(0),this.Ln=void 0,this.Kn(),this.Xn()))},i.prototype.getOverviewMap=function(){return this.Gn},i.prototype.render=function(t){this.Kn(),this.Xn()},i}(r.Z);i.Z=x},75302:function(t,i,e){"use strict";var n=e(39969),r=e(37201),s=e(78657),o=e(62896),a=e(97854),u="units",h="degrees",f="imperial",c="nautical",l="metric",d="us",v=[1,2,5],p=25.4/.28,m=function(t){function i(i){var e=i||{},n=void 0!==e.className?e.className:e.bar?"ol-scale-bar":"ol-scale-line";t.call(this,{element:document.createElement("div"),render:e.render,target:e.target}),this.on,this.once,this.un,this.tr=document.createElement("div"),this.tr.className=n+"-inner",this.element.className=n+" "+s.XV,this.element.appendChild(this.tr),this.er=null,this.nr=void 0!==e.minWidth?e.minWidth:64,this.cn=!1,this.sr=void 0,this.jn="",this.addChangeListener(u,this.ar),this.setUnits(e.units||l),this.ur=e.bar||!1,this.hr=e.steps||4,this.cr=e.text||!1,this.lr=e.dpi||void 0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getUnits=function(){return this.get(u)},i.prototype.ar=function(){this.vn()},i.prototype.setUnits=function(t){this.set(u,t)},i.prototype.setDpi=function(t){this.lr=t},i.prototype.vn=function(){var t=this.er;if(t){var i=t.center,e=t.projection,n=this.getUnits(),s=n==h?r.ZP.DEGREES:r.ZP.METERS,u=(0,o._Q)(e,t.resolution,i,s),m=this.nr*(this.lr||p)/p,y=m*u,g="";if(n==h){var b=o.Wm[r.ZP.DEGREES];(y*=b)=m)break;++S}k=this.ur?this.createScaleBar(M,w,g):w.toFixed(x<0?-x:0)+" "+g,this.jn!=k&&(this.tr.innerHTML=k,this.jn=k),this.sr!=M&&(this.tr.style.width=M+"px",this.sr=M),this.cn||(this.element.style.display="",this.cn=!0)}else this.cn&&(this.element.style.display="none",this.cn=!1)},i.prototype.createScaleBar=function(t,i,e){for(var n="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),r=[],s=t/this.hr,o="#ffffff",a=0;a
'+this.createMarker("relative",a)+(a%2==0||2===this.hr?this.createStepText(a,t,!1,i,e):"")+""),a===this.hr-1&&r.push(this.createStepText(a+1,t,!0,i,e)),o="#ffffff"===o?"#000000":"#ffffff";return'
'+(this.cr?'
'+n+"
":"")+r.join("")+"
"},i.prototype.createMarker=function(t,i){return'
'},i.prototype.createStepText=function(t,i,e,n,r){var s=(0===t?0:Math.round(n/this.hr*t*100)/100)+(0===t?"":" "+r);return'
'+s+"
"},i.prototype.getScaleForResolution=function(){var t=(0,o._Q)(this.er.projection,this.er.resolution,this.er.center),i=this.lr||p,e=this.er.projection.getMetersPerUnit();return parseFloat(t.toString())*e*(1e3/25.4)*i},i.prototype.render=function(t){var i=t.frameState;this.er=i?i.viewState:null,this.vn()},i}(n.Z);i.Z=m},62349:function(t,i,e){"use strict";var n=e(39969),r=e(79021),s=e(95343),o=e(78657),a=e(215),u=e(85832),h=e(19079),f=e(38048),c=0,l=1,d=function(t){function i(i){var e=i||{};t.call(this,{element:document.createElement("div"),render:e.render}),this.Gt=[],this.dr=void 0,this.vr=c,this.Ut,this.pr=0,this.mr=0,this.yr,this.gr,this.br=null,this.wr=!1,this.$e=void 0!==e.duration?e.duration:200;var n=void 0!==e.className?e.className:"ol-zoomslider",a=document.createElement("button");a.setAttribute("type","button"),a.className=n+"-thumb "+o.XV;var u=this.element;u.className=n+" "+o.XV+" "+o.hg,u.appendChild(a),u.addEventListener(s.Z.POINTERDOWN,this.Mr.bind(this),!1),u.addEventListener(s.Z.POINTERMOVE,this.kr.bind(this),!1),u.addEventListener(s.Z.POINTERUP,this.Sr.bind(this),!1),u.addEventListener(r.Z.CLICK,this.Er.bind(this),!1),a.addEventListener(r.Z.CLICK,f.UW,!1)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.setMap=function(i){t.prototype.setMap.call(this,i),i&&i.render()},i.prototype.Tr=function(){var t=this.element,i=t.offsetWidth,e=t.offsetHeight;if(0===i&&0===e)return this.wr=!1;var n=getComputedStyle(t);i-=parseFloat(n.paddingRight)+parseFloat(n.paddingLeft),e-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom);var r=t.firstElementChild,s=getComputedStyle(r),o=r.offsetWidth+parseFloat(s.marginRight)+parseFloat(s.marginLeft),a=r.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom);return this.br=[o,a],i>e?(this.vr=l,this.mr=i-o):(this.vr=c,this.pr=e-a),this.wr=!0},i.prototype.Er=function(t){var i=this.getMap().getView(),e=this._r(t.offsetX-this.br[0]/2,t.offsetY-this.br[1]/2),n=this.Ar(e),r=i.getConstrainedZoom(i.getZoomForResolution(n));i.animateInternal({zoom:r,duration:this.$e,easing:u.Vv})},i.prototype.Mr=function(t){if(!this.Ut&&t.target===this.element.firstElementChild){var i=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.yr=t.clientX-parseFloat(i.style.left),this.gr=t.clientY-parseFloat(i.style.top),this.Ut=!0,0===this.Gt.length){var e=this.kr,n=this.Sr,r=this.getMap().getOwnerDocument();this.Gt.push((0,h.oL)(r,s.Z.POINTERMOVE,e,this),(0,h.oL)(r,s.Z.POINTERUP,n,this))}}},i.prototype.kr=function(t){if(this.Ut){var i=t.clientX-this.yr,e=t.clientY-this.gr,n=this._r(i,e);this.dr=this.Ar(n),this.getMap().getView().setResolution(this.dr)}},i.prototype.Sr=function(t){this.Ut&&(this.getMap().getView().endInteraction(),this.Ut=!1,this.yr=void 0,this.gr=void 0,this.Gt.forEach(h.bN),this.Gt.length=0)},i.prototype.Or=function(t){var i=this.jr(t),e=this.element.firstElementChild;this.vr==l?e.style.left=this.mr*i+"px":e.style.top=this.pr*i+"px"},i.prototype._r=function(t,i){var e;return e=this.vr===l?t/this.mr:i/this.pr,(0,a.uZ)(e,0,1)},i.prototype.Ar=function(t){return this.getMap().getView().getResolutionForValueFunction()(1-t)},i.prototype.jr=function(t){var i=this.getMap().getView().getValueForResolutionFunction();return(0,a.uZ)(1-i(t),0,1)},i.prototype.render=function(t){if(t.frameState&&(this.wr||this.Tr())){var i=t.frameState.viewState.resolution;this.dr=i,this.Or(i)}},i}(n.Z);i.Z=d},22942:function(t,i,e){"use strict";e.d(i,{IH:function(){return o},Ed:function(){return a},oL:function(){return u},Fj:function(){return h},I8:function(){return f},fS:function(){return c},U1:function(){return l},bA:function(){return d},bI:function(){return v},TE:function(){return p},Bs:function(){return m},V7:function(){return y},Cf:function(){return g},jk:function(){return b}});var n=e(85409),r=e(215),s=e(94918);function o(t,i){return t[0]+=+i[0],t[1]+=+i[1],t}function a(t,i){var e=i.getRadius(),n=i.getCenter(),r=n[0],s=n[1],o=t[0]-r,a=t[1]-s;0===o&&0===a&&(o=1);var u=Math.sqrt(o*o+a*a);return[r+e*o/u,s+e*a/u]}function u(t,i){var e,n,r=t[0],s=t[1],o=i[0],a=i[1],u=o[0],h=o[1],f=a[0],c=a[1],l=f-u,d=c-h,v=0===l&&0===d?0:(l*(r-u)+d*(s-h))/(l*l+d*d||0);return v<=0?(e=u,n=h):v>=1?(e=f,n=c):(e=u+v*l,n=h+v*d),[e,n]}function h(t){return function(i){return function(t,i){return function(t,i,e){return t?i.replace("{x}",t[0].toFixed(e)).replace("{y}",t[1].toFixed(e)):""}(t,"{x}, {y}",i)}(i,t)}}function f(t,i,e){var n=(0,r.$W)(i+180,360)-180,o=Math.abs(3600*n),a=e||0,u=Math.pow(10,a),h=Math.floor(o/3600),f=Math.floor((o-3600*h)/60),c=o-3600*h-60*f;return(c=Math.ceil(c*u)/u)>=60&&(c=0,f+=1),f>=60&&(f=0,h+=1),h+"° "+(0,s.v)(f,2)+"′ "+(0,s.v)(c,2,a)+"″"+(0==n?"":" "+t.charAt(n<0?1:0))}function c(t,i){for(var e=!0,n=t.length-1;n>=0;--n)if(t[n]!=i[n]){e=!1;break}return e}function l(t,i){var e=Math.cos(i),n=Math.sin(i),r=t[0]*e-t[1]*n,s=t[1]*e+t[0]*n;return t[0]=r,t[1]=s,t}function d(t,i){return t[0]*=i,t[1]*=i,t}function v(t,i){var e=t[0]-i[0],n=t[1]-i[1];return e*e+n*n}function p(t,i){return Math.sqrt(v(t,i))}function m(t,i){return v(t,u(t,i))}function y(t,i){return t?f("NS",t[1],i)+" "+f("EW",t[0],i):""}function g(t,i){if(i.canWrapX()){var e=(0,n.dz)(i.getExtent()),r=b(t,i,e);r&&(t[0]-=r*e)}return t}function b(t,i,e){var r=i.getExtent(),s=0;if(i.canWrapX()&&(t[0]r[2])){var o=e||(0,n.dz)(r);s=Math.floor((t[0]-r[0])/o)}return s}},78657:function(t,i,e){"use strict";e.d(i,{oj:function(){return n},$A:function(){return r},XV:function(){return s},Qi:function(){return o},hg:function(){return a},hN:function(){return u},p:function(){return c}});var n="ol-hidden",r="ol-selectable",s="ol-unselectable",o="ol-unsupported",a="ol-control",u="ol-collapsed",h=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z]+?)\\s*$"].join(""),"i"),f=["style","variant","weight","size","lineHeight","family"],c=function(t){var i=t.match(h);if(!i)return null;for(var e={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,r=f.length;n0)},i.prototype.removeEventListener=function(t,i){var e=this.Dr&&this.Dr[t];if(e){var n=e.indexOf(i);-1!==n&&(this.Rr&&t in this.Rr?(e[n]=s.Zn,++this.Rr[t]):(e.splice(n,1),0===e.length&&delete this.Dr[t]))}},i}(n.Z);i.Z=a},50314:function(t,i,e){"use strict";e.d(i,{$6:function(){return a},Ko:function(){return u},aj:function(){return h},yZ:function(){return f},Bx:function(){return c},V4:function(){return l},v8:function(){return d},Fi:function(){return v},MJ:function(){return p},Kf:function(){return m},rM:function(){return y},QC:function(){return g},vY:function(){return b},TN:function(){return w},QL:function(){return M},Xp:function(){return x}});var n=e(76653),r=e(51287),s=e(60251),o=e(97854);function a(t){var i=arguments;return function(t){for(var e=!0,n=0,r=i.length;ns&&(h|=r.Z.RIGHT),uo&&(h|=r.Z.ABOVE),h===r.Z.UNKNOWN&&(h=r.Z.INTERSECTING),h}function v(){return[1/0,1/0,-1/0,-1/0]}function p(t,i,e,n,r){return r?(r[0]=t,r[1]=i,r[2]=e,r[3]=n,r):[t,i,e,n]}function m(t){return p(1/0,1/0,-1/0,-1/0,t)}function y(t,i){var e=t[0],n=t[1];return p(e,n,e,n,i)}function g(t,i,e,n,r){return k(m(r),t,i,e,n)}function b(t,i){return t[0]==i[0]&&t[2]==i[2]&&t[1]==i[1]&&t[3]==i[3]}function w(t,i,e){return Math.abs(t[0]-i[0])t[2]&&(t[2]=i[2]),i[1]t[3]&&(t[3]=i[3]),t}function x(t,i){i[0]t[2]&&(t[2]=i[0]),i[1]t[3]&&(t[3]=i[1])}function k(t,i,e,n,r){for(;ei[0]?n[0]=t[0]:n[0]=i[0],t[1]>i[1]?n[1]=t[1]:n[1]=i[1],t[2]=i[0]&&t[1]<=i[3]&&t[3]>=i[1]}function F(t){return t[2]=h&&a<=c),n||!(o&r.Z.RIGHT)||s&r.Z.RIGHT||(n=(u=y-(m-c)*g)>=f&&u<=l),n||!(o&r.Z.BELOW)||s&r.Z.BELOW||(n=(a=m-(y-f)/g)>=h&&a<=c),n||!(o&r.Z.LEFT)||s&r.Z.LEFT||(n=(u=y-(m-h)*g)>=f&&u<=l)}return n}function B(t,i,e,n){var r=[];if(n>1)for(var s=t[2]-t[0],o=t[3]-t[1],a=0;a=e[2])){var r=D(e),s=Math.floor((n[0]-e[0])/r)*r;t[0]-=s,t[2]-=s}return t}},1812:function(t,i){"use strict";i.Z={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},66375:function(t,i){"use strict";i.Z={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16}},25658:function(t,i,e){"use strict";e.d(i,{ov:function(){return o},Be:function(){return a}});var n=e(53907),r=e(51287),s=!1;function o(t,i,e,r,o,a,u){var h=new XMLHttpRequest;h.open("GET","function"==typeof t?t(e,r,o):t,!0),i.getType()==n.Z.ARRAY_BUFFER&&(h.responseType="arraybuffer"),h.withCredentials=s,h.onload=function(t){if(!h.status||h.status>=200&&h.status<300){var r,s=i.getType();s==n.Z.JSON||s==n.Z.TEXT?r=h.responseText:s==n.Z.XML?(r=h.responseXML)||(r=(new DOMParser).parseFromString(h.responseText,"application/xml")):s==n.Z.ARRAY_BUFFER&&(r=h.response),r?a(i.readFeatures(r,{extent:e,featureProjection:o}),i.readProjection(r)):u()}else u()},h.onerror=u,h.send()}function a(t,i){return function(e,n,s,a,u){var h=this;o(t,i,e,n,s,(function(t,i){h.addFeatures(t),void 0!==a&&a(t)}),u||r.Zn)}}},13843:function(t,i,e){"use strict";var n=e(39352),r=e(79007),s=e(32431),o=e(60171),a=e(61067),u=e(11847),h=e(33796),f=e(69803),c=e(14415),l=e(92535),d=e(60392),v=e(97854),p=e(79309),m=e(85409),y=e(32662),g=e(62896),b=e(79901),w=e(67369),M={};M[s.Z.POINT]=function(t){var i;i=void 0!==t.m&&void 0!==t.z?new l.Z([t.x,t.y,t.z,t.m],r.Z.XYZM):void 0!==t.z?new l.Z([t.x,t.y,t.z],r.Z.XYZ):void 0!==t.m?new l.Z([t.x,t.y,t.m],r.Z.XYM):new l.Z([t.x,t.y]);return i},M[s.Z.LINE_STRING]=function(t){var i=E(t);return new a.Z(t.paths[0],i)},M[s.Z.POLYGON]=function(t){var i=E(t);return new d.ZP(t.rings,i)},M[s.Z.MULTI_POINT]=function(t){var i=E(t);return new f.Z(t.points,i)},M[s.Z.MULTI_LINE_STRING]=function(t){var i=E(t);return new h.Z(t.paths,i)},M[s.Z.MULTI_POLYGON]=function(t){var i=E(t);return new c.Z(t.rings,i)};var x={};x[s.Z.POINT]=function(t,i){var e,n=t.getCoordinates(),s=t.getLayout();s===r.Z.XYZ?e={x:n[0],y:n[1],z:n[2]}:s===r.Z.XYM?e={x:n[0],y:n[1],m:n[2]}:s===r.Z.XYZM?e={x:n[0],y:n[1],z:n[2],m:n[3]}:s===r.Z.XY?e={x:n[0],y:n[1]}:(0,v.h)(!1,34);return e},x[s.Z.LINE_STRING]=function(t,i){var e=T(t);return{hasZ:e.hasZ,hasM:e.hasM,paths:[t.getCoordinates()]}},x[s.Z.POLYGON]=function(t,i){var e=T(t);return{hasZ:e.hasZ,hasM:e.hasM,rings:t.getCoordinates(!1)}},x[s.Z.MULTI_POINT]=function(t,i){var e=T(t);return{hasZ:e.hasZ,hasM:e.hasM,points:t.getCoordinates()}},x[s.Z.MULTI_LINE_STRING]=function(t,i){var e=T(t);return{hasZ:e.hasZ,hasM:e.hasM,paths:t.getCoordinates()}},x[s.Z.MULTI_POLYGON]=function(t,i){for(var e=T(t),n=t.getCoordinates(!1),r=[],s=0;s=0;o--)r.push(n[s][o]);return{hasZ:e.hasZ,hasM:e.hasM,rings:r}};var k=function(t){function i(i){var e=i||{};t.call(this),this.H=e.geometryName}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.readFeatureFromObject=function(t,i,e){var r=t,s=S(r.geometry,i),o=new n.Z;if(this.H&&o.setGeometryName(this.H),o.setGeometry(s),r.attributes){o.setProperties(r.attributes,!0);var a=r.attributes[e];void 0!==a&&o.setId(a)}return o},i.prototype.readFeaturesFromObject=function(t,i){var e=i||{};if(t.features){for(var n=[],r=t.features,s=0,o=r.length;s=0;e--){var f=s[e][0];if((0,m.r4)(new u.Z(f).getExtent(),new u.Z(a).getExtent())){s[e].push(a),h=!0;break}}h||s.push([a.reverse()])}return s}(o.rings,a);1===h.length?(r=s.Z.POLYGON,t=(0,p.f0)({},t,((e={}).rings=h[0],e))):(r=s.Z.MULTI_POLYGON,t=(0,p.f0)({},t,((n={}).rings=h,n)))}var f=M[r];return(0,w.fI)(f(t),!1,i)}function E(t){var i=r.Z.XY;return!0===t.hasZ&&!0===t.hasM?i=r.Z.XYZM:!0===t.hasZ?i=r.Z.XYZ:!0===t.hasM&&(i=r.Z.XYM),i}function T(t){var i=t.getLayout();return{hasZ:i===r.Z.XYZ||i===r.Z.XYZM,hasM:i===r.Z.XYM||i===r.Z.XYZM}}function _(t,i){return(0,x[t.getType()])((0,w.fI)(t,!0,i),i)}i.Z=k},67369:function(t,i,e){"use strict";e.d(i,{fI:function(){return u},lj:function(){return h}});var n=e(37201),r=e(77097),s=e(79309),o=e(62896),a=function(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null};function u(t,i,e){var n,r=e?(0,o.U2)(e.featureProjection):null,s=e?(0,o.U2)(e.dataProjection):null;if(n=r&&s&&!(0,o.OP)(r,s)?(i?t.clone():t).transform(i?r:s,i?s:r):t,i&&e&&void 0!==e.decimals){var a=Math.pow(10,e.decimals);n===t&&(n=t.clone()),n.applyTransform((function(t){for(var i=0,e=t.length;i0){s[u]={$r:s[u]};for(var f=0;f0:l===d.Z.POINT||l===d.Z.MULTI_POINT}}a&&(u=s.get("name"),(a=a&&!!u)&&u.search(/&[^&]+;/)>-1&&(J||(J=document.createElement("textarea")),J.innerHTML=u,u=J.value));var v=e;if(t?v=t:i&&(v=nt(i,e,n)),a){var p=function(t,i){var e=[0,0],n="start",r=t.getImage();if(r){var s=r.getSize();if(s&&2==s.length){var o=r.getScaleArray(),a=r.getAnchor();e[0]=o[0]*(s[0]-a[0]),e[1]=o[1]*(s[1]/2-a[1]),n="left"}}var u=t.getText();u?((u=u.clone()).setFont(u.getFont()||Y.getFont()),u.setScale(u.getScale()||Y.getScale()),u.setFill(u.getFill()||Y.getFill()),u.setStroke(u.getStroke()||H)):u=Y.clone();return u.setText(i),u.setOffsetX(e[0]),u.setOffsetY(e[1]),u.setTextAlign(n),new E.ZP({image:r,text:u})}(v[0],u);return h.length>0?(p.setGeometry(new c.Z(h)),[p,new E.ZP({geometry:v[0].getGeometry(),image:null,fill:v[0].getFill(),stroke:v[0].getStroke(),text:null})].concat(v.slice(1))):p}return v}}(e.Style,e.styleUrl,this.ts,this.us,this.hs);n.setStyle(a)}return delete e.Style,n.setProperties(e,!0),n}},i.prototype.ps=function(t,i){var e=t.getAttribute("id");if(null!==e){var n=It.call(this,t,i);if(n){var r,s=t.baseURI;if(s&&"about:blank"!=s||(s=window.location.href),s)r=new URL("#"+e,s).href;else r="#"+e;this.us[r]=n}}},i.prototype.ys=function(t,i){var e=t.getAttribute("id");if(null!==e){var n=ft.call(this,t,i);if(n){var r,s=t.baseURI;if(s&&"about:blank"!=s||(s=window.location.href),s)r=new URL("#"+e,s).href;else r="#"+e;this.us[r]=n}}},i.prototype.readFeatureFromNode=function(t,i){if(!(0,C.q9)(L,t.namespaceURI))return null;var e=this.ds(t,[this.getReadOptions(t,i)]);return e||null},i.prototype.readFeaturesFromNode=function(t,i){if(!(0,C.q9)(L,t.namespaceURI))return[];var e,n=t.localName;if("Document"==n||"Folder"==n)return(e=this.ls(t,[this.getReadOptions(t,i)]))||[];if("Placemark"==n){var r=this.ds(t,[this.getReadOptions(t,i)]);return r?[r]:[]}if("kml"==n){e=[];for(var s=t.firstElementChild;s;s=s.nextElementSibling){var o=this.readFeaturesFromNode(s,i);o&&(0,C.l7)(e,o)}return e}return[]},i.prototype.readName=function(t){if(t){if("string"==typeof t){var i=(0,A.Qc)(t);return this.readNameFromDocument(i)}return(0,A.qk)(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},i.prototype.readNameFromDocument=function(t){for(var i=t.firstChild;i;i=i.nextSibling)if(i.nodeType==Node.ELEMENT_NODE){var e=this.readNameFromNode(i);if(e)return e}},i.prototype.readNameFromNode=function(t){for(var i=t.firstElementChild;i;i=i.nextElementSibling)if((0,C.q9)(L,i.namespaceURI)&&"name"==i.localName)return(0,R.s2)(i);for(var e=t.firstElementChild;e;e=e.nextElementSibling){var n=e.localName;if((0,C.q9)(L,e.namespaceURI)&&("Document"==n||"Folder"==n||"Placemark"==n||"kml"==n)){var r=this.readNameFromNode(e);if(r)return r}}},i.prototype.readNetworkLinks=function(t){var i=[];if("string"==typeof t){var e=(0,A.Qc)(t);(0,C.l7)(i,this.readNetworkLinksFromDocument(e))}else(0,A.qk)(t)?(0,C.l7)(i,this.readNetworkLinksFromDocument(t)):(0,C.l7)(i,this.readNetworkLinksFromNode(t));return i},i.prototype.readNetworkLinksFromDocument=function(t){for(var i=[],e=t.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&(0,C.l7)(i,this.readNetworkLinksFromNode(e));return i},i.prototype.readNetworkLinksFromNode=function(t){for(var i=[],e=t.firstElementChild;e;e=e.nextElementSibling)if((0,C.q9)(L,e.namespaceURI)&&"NetworkLink"==e.localName){var n=(0,A.O)({},U,e,[]);i.push(n)}for(var r=t.firstElementChild;r;r=r.nextElementSibling){var s=r.localName;!(0,C.q9)(L,r.namespaceURI)||"Document"!=s&&"Folder"!=s&&"kml"!=s||(0,C.l7)(i,this.readNetworkLinksFromNode(r))}return i},i.prototype.readRegion=function(t){var i=[];if("string"==typeof t){var e=(0,A.Qc)(t);(0,C.l7)(i,this.readRegionFromDocument(e))}else(0,A.qk)(t)?(0,C.l7)(i,this.readRegionFromDocument(t)):(0,C.l7)(i,this.readRegionFromNode(t));return i},i.prototype.readRegionFromDocument=function(t){for(var i=[],e=t.firstChild;e;e=e.nextSibling)e.nodeType==Node.ELEMENT_NODE&&(0,C.l7)(i,this.readRegionFromNode(e));return i},i.prototype.readRegionFromNode=function(t){for(var i=[],e=t.firstElementChild;e;e=e.nextElementSibling)if((0,C.q9)(L,e.namespaceURI)&&"Region"==e.localName){var n=(0,A.O)({},B,e,[]);i.push(n)}for(var r=t.firstElementChild;r;r=r.nextElementSibling){var s=r.localName;!(0,C.q9)(L,r.namespaceURI)||"Document"!=s&&"Folder"!=s&&"kml"!=s||(0,C.l7)(i,this.readRegionFromNode(r))}return i},i.prototype.writeFeaturesNode=function(t,i){i=this.adaptOptions(i);var e=(0,A.c)(L[4],"kml"),n="http://www.w3.org/2000/xmlns/";e.setAttributeNS(n,"xmlns:gx",D[0]),e.setAttributeNS(n,"xmlns:xsi",A.fJ),e.setAttributeNS(A.fJ,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var r={node:e},s={};t.length>1?s.Document=t:1==t.length&&(s.Placemark=t[0]);var o=q[e.namespaceURI],a=(0,A.RA)(s,o);return(0,A.ZL)(r,V,A.hg,a,[i],o,this),e},i}(_.Z);function nt(t,i,e){return Array.isArray(t)?t:"string"==typeof t?nt(e[t],i,e):i}function rt(t){var i=(0,A.Ve)(t,!1),e=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(i);if(e){var n=e[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}}function st(t){var i=(0,A.Ve)(t,!1),e=[];i=i.replace(/\s*,\s*/g,",");for(var n,r=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;n=r.exec(i);){var s=parseFloat(n[1]),o=parseFloat(n[2]),a=n[3]?parseFloat(n[3]):0;e.push(s,o,a),i=i.substr(n[0].length)}if(""===i)return e}function ot(t){var i=(0,A.Ve)(t,!1).trim(),e=t.baseURI;return e&&"about:blank"!=e||(e=window.location.href),e?new URL(i,e).href:i}function at(t){var i=(0,A.Ve)(t,!1).trim().replace(/^(?!.*#)/,"#"),e=t.baseURI;return e&&"about:blank"!=e||(e=window.location.href),e?new URL(i,e).href:i}function ut(t){return(0,R.fy)(t)}var ht=(0,A.C5)(L,{Pair:function(t,i){var e=(0,A.O)({},Ft,t,i,this);if(!e)return;var n=e.key;if(n&&"normal"==n){var r=e.styleUrl;r&&(i[i.length-1]=r);var s=e.Style;s&&(i[i.length-1]=s)}}});function ft(t,i){return(0,A.O)(void 0,ht,t,i,this)}var ct=(0,A.C5)(L,{Icon:(0,A.Pr)((function(t,i){var e=(0,A.O)({},wt,t,i);return e||null})),color:(0,A.Pr)(rt),heading:(0,A.Pr)(R.fy),hotSpot:(0,A.Pr)((function(t){var i,e=t.getAttribute("xunits"),n=t.getAttribute("yunits");return i="insetPixels"!==e?"insetPixels"!==n?m.Z.BOTTOM_LEFT:m.Z.TOP_LEFT:"insetPixels"!==n?m.Z.BOTTOM_RIGHT:m.Z.TOP_RIGHT,{x:parseFloat(t.getAttribute("x")),xunits:F[e],y:parseFloat(t.getAttribute("y")),yunits:F[n],origin:i}})),scale:(0,A.Pr)(ut)});var lt=(0,A.C5)(L,{color:(0,A.Pr)(rt),scale:(0,A.Pr)(ut)});var dt=(0,A.C5)(L,{color:(0,A.Pr)(rt),width:(0,A.Pr)(R.fy)});var vt=(0,A.C5)(L,{color:(0,A.Pr)(rt),fill:(0,A.Pr)(R.ud),outline:(0,A.Pr)(R.ud)});var pt=(0,A.C5)(L,{coordinates:(0,A.z)(st)});function mt(t,i){return(0,A.O)(null,pt,t,i)}var yt=(0,A.C5)(D,{Track:(0,A.Ei)(bt)});var gt=(0,A.C5)(L,{when:function(t,i){var e=i[i.length-1].whens,n=(0,A.Ve)(t,!1),r=Date.parse(n);e.push(isNaN(r)?0:r)}},(0,A.C5)(D,{coord:function(t,i){var e=i[i.length-1].coordinates,n=(0,A.Ve)(t,!1),r=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(n);if(r){var s=parseFloat(r[1]),o=parseFloat(r[2]),a=parseFloat(r[3]);e.push([s,o,a])}else e.push([])}}));function bt(t,i){var e=(0,A.O)({coordinates:[],whens:[]},gt,t,i);if(e){for(var n=[],r=e.coordinates,s=e.whens,o=0,a=Math.min(r.length,s.length);o0){var n=i[i.length-1];n.push.apply(n,e)}},outerBoundaryIs:function(t,i){var e=(0,A.O)(void 0,qt,t,i);if(e){i[i.length-1][0]=e}}});function jt(t,i){var e=(0,A.O)({},kt,t,i),n=(0,A.O)([null],Ot,t,i);if(n&&n[0]){for(var r=n[0],s=[r.length],o=1,a=n.length;o0,g=d.href;g?n=g:p&&(n=u);var b,w=m.Z.BOTTOM_LEFT,M=e.hotSpot;M?(h=[M.x,M.y],f=M.xunits,c=M.yunits,w=M.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(n)&&(/pushpin/.test(n)?(h=r,f=s,c=o):/arrow-reverse/.test(n)?(h=[54,42],f=s,c=o):/paddle/.test(n)&&(h=[32,1],f=s,c=o));var x,k=d.x,S=d.y;void 0!==k&&void 0!==S&&(b=[k,S]);var E,T=d.w,_=d.h;void 0!==T&&void 0!==_&&(x=[T,_]);var O=e.heading;void 0!==O&&(E=(0,P.Yr)(O));var j=e.scale,C=e.color;if(p){n==u&&(x=a);var I=new v.Z({anchor:h,anchorOrigin:w,anchorXUnits:f,anchorYUnits:c,crossOrigin:this.jt,offset:b,offsetOrigin:m.Z.BOTTOM_LEFT,rotation:E,scale:j,size:x,src:this.cs(n),color:C}),R=I.getScaleArray()[0],N=I.getSize();if(null===N){var D=I.getImageState();if(D===y.Z.IDLE||D===y.Z.LOADING){var L=function(){var t=I.getImageState();if(t!==y.Z.IDLE&&t!==y.Z.LOADING){var i=I.getSize();if(i&&2==i.length){var e=tt(i);I.setScale(R*e)}I.unlistenImageChange(L)}};I.listenImageChange(L),D===y.Z.IDLE&&I.load()}}else if(2==N.length){var F=tt(N);I.setScale(R*F)}l.imageStyle=I}else l.imageStyle=$}},LabelStyle:function(t,i){var e=(0,A.O)({},lt,t,i);if(e){var r=i[i.length-1],s=new T.Z({fill:new f.Z({color:"color"in e?e.color:n}),scale:e.scale});r.textStyle=s}},LineStyle:function(t,i){var e=(0,A.O)({},dt,t,i);if(e){var r=i[i.length-1],s=new S.Z({color:"color"in e?e.color:n,width:"width"in e?e.width:1});r.strokeStyle=s}},PolyStyle:function(t,i){var e=(0,A.O)({},vt,t,i);if(e){var r=i[i.length-1],s=new f.Z({color:"color"in e?e.color:n});r.fillStyle=s;var o=e.fill;void 0!==o&&(r.fill=o);var a=e.outline;void 0!==a&&(r.outline=a)}}});function It(t,i){var e=(0,A.O)({},Ct,t,i,this);if(!e)return null;var n,r="fillStyle"in e?e.fillStyle:Z,s=e.fill;void 0===s||s||(r=null),"imageStyle"in e?e.imageStyle!=$&&(n=e.imageStyle):n=W;var o="textStyle"in e?e.textStyle:Y,a="strokeStyle"in e?e.strokeStyle:K,u=e.outline;return void 0===u||u?[new E.ZP({fill:r,image:n,stroke:a,text:o,zIndex:void 0})]:[new E.ZP({geometry:function(t){var i=t.getGeometry(),e=i.getType();if(e===d.Z.GEOMETRY_COLLECTION){var n=i;return new c.Z(n.getGeometriesArrayRecursive().filter((function(t){var i=t.getType();return i!==d.Z.POLYGON&&i!==d.Z.MULTI_POLYGON})))}if(e!==d.Z.POLYGON&&e!==d.Z.MULTI_POLYGON)return i},fill:r,image:n,stroke:a,text:o,zIndex:void 0}),new E.ZP({geometry:function(t){var i=t.getGeometry(),e=i.getType();if(e===d.Z.GEOMETRY_COLLECTION){var n=i;return new c.Z(n.getGeometriesArrayRecursive().filter((function(t){var i=t.getType();return i===d.Z.POLYGON||i===d.Z.MULTI_POLYGON})))}if(e===d.Z.POLYGON||e===d.Z.MULTI_POLYGON)return i},fill:r,stroke:null,zIndex:void 0})]}function Rt(t,i){var e,n,r,s=i.length,o=new Array(i.length),a=new Array(i.length),u=new Array(i.length);e=!1,n=!1,r=!1;for(var h=0;h0){var g={names:o,values:(0,A.RA)(r,o)};(0,A.ZL)(n,vi,mi,[g],e)}var b=e[0],w=i.getGeometry();w&&(w=(0,N.fI)(w,!0,b)),(0,A.ZL)(n,vi,si,[w],e)}var gi=(0,A.C5)(L,["extrude","tessellate","altitudeMode","coordinates"]),bi=(0,A.C5)(L,{extrude:(0,A.A4)(R.Vi),tessellate:(0,A.A4)(R.Vi),altitudeMode:(0,A.A4)(R.bZ),coordinates:(0,A.A4)((function(t,i,e){var n,r=e[e.length-1],s=r.layout,o=r.stride;s==l.Z.XY||s==l.Z.XYM?n=2:s==l.Z.XYZ||s==l.Z.XYZM?n=3:(0,j.h)(!1,34);var a=i.length,u="";if(a>0){u+=i[0];for(var h=1;h>3}o--,1===s||2===s?(a+=t.readSVarint(),u+=t.readSVarint(),1===s&&h>f&&(n.push(h),f=h),e.push(a,u),h+=2):7===s?h>f&&(e.push(e[f],e[f+1]),h+=2):(0,y.h)(!1,59)}h>f&&(n.push(h),f=h)},i.prototype.Ss=function(t,i,e){var r,c=i.type;if(0===c)return null;var v,m=i.properties;this.xs?(v=m[this.xs],delete m[this.xs]):v=i.id,m[this.ws]=i.layer.name;var y=[],g=[];this.ks(t,i,y,g);var w=function(t,i){var e;1===t?e=1===i?o.Z.POINT:o.Z.MULTI_POINT:2===t?e=1===i?o.Z.LINE_STRING:o.Z.MULTI_LINE_STRING:3===t&&(e=o.Z.POLYGON);return e}(c,g.length);if(this.bs===p.Z)(r=new this.bs(w,y,g,m,v)).transform(e.dataProjection);else{var M;if(w==o.Z.POLYGON){for(var x=[],k=0,S=0,E=0,T=g.length;E1?new f.Z(y,s.Z.XY,x):new d.ZP(y,s.Z.XY,g)}else M=w===o.Z.POINT?new l.Z(y,s.Z.XY):w===o.Z.LINE_STRING?new a.Z(y,s.Z.XY):w===o.Z.POLYGON?new d.ZP(y,s.Z.XY,g):w===o.Z.MULTI_POINT?new h.Z(y,s.Z.XY):w===o.Z.MULTI_LINE_STRING?new u.Z(y,s.Z.XY,g):null;r=new(0,this.bs),this.H&&r.setGeometryName(this.H);var A=(0,n.fI)(M,!1,e);r.setGeometry(A),r.setId(v),r.setProperties(m,!0)}return r},i.prototype.getType=function(){return r.Z.ARRAY_BUFFER},i.prototype.readFeatures=function(t,i){var e=this.Ms,n=this.adaptOptions(i),r=(0,g.U2)(n.dataProjection);r.setWorldExtent(n.extent),n.dataProjection=r;var s=new c(t),o=s.readFields(M,{}),a=[];for(var u in o)if(!e||-1!=e.indexOf(u)){var h=o[u],f=h?[0,0,h.extent,h.extent]:null;r.setExtent(f);for(var l=0,d=h.length;l>3)?e.readString():2===t?e.readFloat():3===t?e.readDouble():4===t?e.readVarint64():5===t?e.readVarint():6===t?e.readSVarint():7===t?e.readBoolean():null;i.values.push(n)}}function k(t,i,e){if(1==t)i.id=e.readVarint();else if(2==t)for(var n=e.readVarint()+e.pos;e.pos0&&r.pop(),n=e>=0?i[e]:i[~e].slice().reverse(),r.push.apply(r,n);for(var a=0,u=r.length;a="a"&&t<="z"||t>="A"&&t<="Z"},T.prototype._s=function(t,i){return t>="0"&&t<="9"||"."==t&&!(void 0!==i&&i)},T.prototype.Os=function(t){return" "==t||"\t"==t||"\r"==t||"\n"==t},T.prototype.Is=function(){return this.wkt.charAt(++this.Es)},T.prototype.nextToken=function(){var t,i=this.Is(),e=this.Es,n=i;if("("==i)t=b;else if(","==i)t=x;else if(")"==i)t=w;else if(this._s(i)||"-"==i)t=M,n=this.Rs();else if(this.Ts(i))t=g,n=this.Ps();else{if(this.Os(i))return this.nextToken();if(""!==i)throw new Error("Unexpected character: "+i);t=k}return{position:e,value:n,type:t}},T.prototype.Rs=function(){var t,i=this.Es,e=!1,n=!1;do{"."==t?e=!0:"e"!=t&&"E"!=t||(n=!0),t=this.Is()}while(this._s(t,e)||!n&&("e"==t||"E"==t)||n&&("-"==t||"+"==t));return parseFloat(this.wkt.substring(i,this.Es--))},T.prototype.Ps=function(){var t,i=this.Es;do{t=this.Is()}while(this.Ts(t));return this.wkt.substring(i,this.Es--).toUpperCase()};var _=function(t){this.Ns=t,this.Ds={position:0,type:y},this.Ls=s.Z.XY};_.prototype.Fs=function(){this.Ds=this.Ns.nextToken()},_.prototype.isTokenType=function(t){return this.Ds.type==t},_.prototype.match=function(t){var i=this.isTokenType(t);return i&&this.Fs(),i},_.prototype.parse=function(){return this.Fs(),this.zs()},_.prototype.Us=function(){var t=s.Z.XY,i=this.Ds;if(this.isTokenType(g)){var e=i.value;"Z"===e?t=s.Z.XYZ:"M"===e?t=s.Z.XYM:"ZM"===e&&(t=s.Z.XYZM),t!==s.Z.XY&&this.Fs()}return t},_.prototype.Gs=function(){if(this.match(b)){var t=[];do{t.push(this.zs())}while(this.match(x));if(this.match(w))return t}throw new Error(this.qs())},_.prototype.Zs=function(){if(this.match(b)){var t=this.$s();if(this.match(w))return t}throw new Error(this.qs())},_.prototype.Ws=function(){if(this.match(b)){var t=this.Hs();if(this.match(w))return t}throw new Error(this.qs())},_.prototype.Ks=function(){if(this.match(b)){var t=this.Ys();if(this.match(w))return t}throw new Error(this.qs())},_.prototype.Xs=function(){var t;if(this.match(b)&&(t=this.Ds.type==b?this.Js():this.Hs(),this.match(w)))return t;throw new Error(this.qs())},_.prototype.Qs=function(){if(this.match(b)){var t=this.Ys();if(this.match(w))return t}throw new Error(this.qs())},_.prototype.io=function(){if(this.match(b)){var t=this.eo();if(this.match(w))return t}throw new Error(this.qs())},_.prototype.$s=function(){for(var t=[],i=this.Ls.length,e=0;e0&&(i+=" "+n)}return 0===e.length?i+" "+m:i+"("+e+")"}i.Z=A},36667:function(t,i,e){"use strict";e.d(i,{Z:function(){return G}});var n=e(42772),r=e(39360),s=e(60588),o=e(87349),a=[null,"http://www.opengis.net/ows/1.1"],u=(0,r.C5)(a,{ServiceIdentification:(0,r.Pr)((function(t,i){return(0,r.O)({},M,t,i)})),ServiceProvider:(0,r.Pr)((function(t,i){return(0,r.O)({},x,t,i)})),OperationsMetadata:(0,r.Pr)((function(t,i){return(0,r.O)({},y,t,i)}))}),h=function(t){function i(){t.call(this)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.readFromNode=function(t){var i=(0,r.O)({},u,t,[]);return i||null},i}(n.Z),f=(0,r.C5)(a,{DeliveryPoint:(0,r.Pr)(o.s2),City:(0,r.Pr)(o.s2),AdministrativeArea:(0,r.Pr)(o.s2),PostalCode:(0,r.Pr)(o.s2),Country:(0,r.Pr)(o.s2),ElectronicMailAddress:(0,r.Pr)(o.s2)}),c=(0,r.C5)(a,{Value:(0,r.ke)((function(t,i){return(0,o.s2)(t)}))}),l=(0,r.C5)(a,{AllowedValues:(0,r.Pr)((function(t,i){return(0,r.O)({},c,t,i)}))}),d=(0,r.C5)(a,{Phone:(0,r.Pr)((function(t,i){return(0,r.O)({},g,t,i)})),Address:(0,r.Pr)((function(t,i){return(0,r.O)({},f,t,i)}))}),v=(0,r.C5)(a,{HTTP:(0,r.Pr)((function(t,i){return(0,r.O)({},p,t,i)}))}),p=(0,r.C5)(a,{Get:(0,r.ke)((function(t,i){var e=(0,s.Q)(t);if(!e)return;return(0,r.O)({href:e},b,t,i)})),Post:void 0}),m=(0,r.C5)(a,{DCP:(0,r.Pr)((function(t,i){return(0,r.O)({},v,t,i)}))}),y=(0,r.C5)(a,{Operation:function(t,i){var e=t.getAttribute("name"),n=(0,r.O)({},m,t,i);if(!n)return;i[i.length-1][e]=n}}),g=(0,r.C5)(a,{Voice:(0,r.Pr)(o.s2),Facsimile:(0,r.Pr)(o.s2)}),b=(0,r.C5)(a,{Constraint:(0,r.ke)((function(t,i){var e=t.getAttribute("name");if(!e)return;return(0,r.O)({name:e},l,t,i)}))}),w=(0,r.C5)(a,{IndividualName:(0,r.Pr)(o.s2),PositionName:(0,r.Pr)(o.s2),ContactInfo:(0,r.Pr)((function(t,i){return(0,r.O)({},d,t,i)}))}),M=(0,r.C5)(a,{Abstract:(0,r.Pr)(o.s2),AccessConstraints:(0,r.Pr)(o.s2),Fees:(0,r.Pr)(o.s2),Title:(0,r.Pr)(o.s2),ServiceTypeVersion:(0,r.Pr)(o.s2),ServiceType:(0,r.Pr)(o.s2)}),x=(0,r.C5)(a,{ProviderName:(0,r.Pr)(o.s2),ProviderSite:(0,r.Pr)(s.Q),ServiceContact:(0,r.Pr)((function(t,i){return(0,r.O)({},w,t,i)}))});var k=h,S=e(85409),E=[null,"http://www.opengis.net/wmts/1.0"],T=[null,"http://www.opengis.net/ows/1.1"],_=(0,r.C5)(E,{Contents:(0,r.Pr)((function(t,i){return(0,r.O)({},O,t,i)}))}),A=function(t){function i(){t.call(this),this.oo=new k}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.readFromNode=function(t){var i=t.getAttribute("version");i&&(i=i.trim());var e=this.oo.readFromNode(t);return e?(e.version=i,(e=(0,r.O)(e,_,t,[]))||null):null},i}(n.Z),O=(0,r.C5)(E,{Layer:(0,r.ke)((function(t,i){return(0,r.O)({},j,t,i)})),TileMatrixSet:(0,r.ke)((function(t,i){return(0,r.O)({},L,t,i)}))}),j=(0,r.C5)(E,{Style:(0,r.ke)((function(t,i){var e=(0,r.O)({},C,t,i);if(!e)return;var n="true"===t.getAttribute("isDefault");return e.isDefault=n,e})),Format:(0,r.ke)(o.s2),TileMatrixSetLink:(0,r.ke)((function(t,i){return(0,r.O)({},I,t,i)})),Dimension:(0,r.ke)((function(t,i){return(0,r.O)({},N,t,i)})),ResourceURL:(0,r.ke)((function(t,i){var e=t.getAttribute("format"),n=t.getAttribute("template"),r=t.getAttribute("resourceType"),s={};e&&(s.format=e);n&&(s.template=n);r&&(s.resourceType=r);return s}))},(0,r.C5)(T,{Title:(0,r.Pr)(o.s2),Abstract:(0,r.Pr)(o.s2),WGS84BoundingBox:(0,r.Pr)(z),Identifier:(0,r.Pr)(o.s2)})),C=(0,r.C5)(E,{LegendURL:(0,r.ke)((function(t,i){var e={};return e.format=t.getAttribute("format"),e.href=(0,s.Q)(t),e}))},(0,r.C5)(T,{Title:(0,r.Pr)(o.s2),Identifier:(0,r.Pr)(o.s2)})),I=(0,r.C5)(E,{TileMatrixSet:(0,r.Pr)(o.s2),TileMatrixSetLimits:(0,r.Pr)((function(t,i){return(0,r.O)([],R,t,i)}))}),R=(0,r.C5)(E,{TileMatrixLimits:(0,r.Ei)((function(t,i){return(0,r.O)({},P,t,i)}))}),P=(0,r.C5)(E,{TileMatrix:(0,r.Pr)(o.s2),MinTileRow:(0,r.Pr)(o.$L),MaxTileRow:(0,r.Pr)(o.$L),MinTileCol:(0,r.Pr)(o.$L),MaxTileCol:(0,r.Pr)(o.$L)}),N=(0,r.C5)(E,{Default:(0,r.Pr)(o.s2),Value:(0,r.ke)(o.s2)},(0,r.C5)(T,{Identifier:(0,r.Pr)(o.s2)})),D=(0,r.C5)(T,{LowerCorner:(0,r.Ei)(U),UpperCorner:(0,r.Ei)(U)}),L=(0,r.C5)(E,{WellKnownScaleSet:(0,r.Pr)(o.s2),TileMatrix:(0,r.ke)((function(t,i){return(0,r.O)({},F,t,i)}))},(0,r.C5)(T,{SupportedCRS:(0,r.Pr)(o.s2),Identifier:(0,r.Pr)(o.s2),BoundingBox:(0,r.Pr)(z)})),F=(0,r.C5)(E,{TopLeftCorner:(0,r.Pr)(U),ScaleDenominator:(0,r.Pr)(o.fy),TileWidth:(0,r.Pr)(o.$L),TileHeight:(0,r.Pr)(o.$L),MatrixWidth:(0,r.Pr)(o.$L),MatrixHeight:(0,r.Pr)(o.$L)},(0,r.C5)(T,{Identifier:(0,r.Pr)(o.s2)}));function z(t,i){var e=(0,r.O)([],D,t,i);if(2==e.length)return(0,S.hI)(e)}function U(t,i){var e=(0,o.s2)(t).split(/\s+/);if(e&&2==e.length){var n=+e[0],r=+e[1];if(!isNaN(n)&&!isNaN(r))return[n,r]}}var G=A},42772:function(t,i,e){"use strict";var n=e(39360),r=function(){};r.prototype.read=function(t){if(t){if("string"==typeof t){var i=(0,n.Qc)(t);return this.readFromDocument(i)}return(0,n.qk)(t)?this.readFromDocument(t):this.readFromNode(t)}return null},r.prototype.readFromDocument=function(t){for(var i=t.firstChild;i;i=i.nextSibling)if(i.nodeType==Node.ELEMENT_NODE)return this.readFromNode(i);return null},r.prototype.readFromNode=function(t){},i.Z=r},87297:function(t,i,e){"use strict";var n=e(67369),r=e(53907),s=e(77097),o=e(95083),a=e(39360),u=function(t){function i(){t.call(this),this.ao=(0,a.xc)()}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getType=function(){return r.Z.XML},i.prototype.readFeature=function(t,i){if(t){if("string"==typeof t){var e=(0,a.Qc)(t);return this.readFeatureFromDocument(e,i)}return(0,a.qk)(t)?this.readFeatureFromDocument(t,i):this.readFeatureFromNode(t,i)}return null},i.prototype.readFeatureFromDocument=function(t,i){var e=this.readFeaturesFromDocument(t,i);return e.length>0?e[0]:null},i.prototype.readFeatureFromNode=function(t,i){return null},i.prototype.readFeatures=function(t,i){if(t){if("string"==typeof t){var e=(0,a.Qc)(t);return this.readFeaturesFromDocument(e,i)}return(0,a.qk)(t)?this.readFeaturesFromDocument(t,i):this.readFeaturesFromNode(t,i)}return[]},i.prototype.readFeaturesFromDocument=function(t,i){for(var e=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&(0,o.l7)(e,this.readFeaturesFromNode(n,i));return e},i.prototype.readFeaturesFromNode=function(t,i){return(0,s.O3)()},i.prototype.readGeometry=function(t,i){if(t){if("string"==typeof t){var e=(0,a.Qc)(t);return this.readGeometryFromDocument(e,i)}return(0,a.qk)(t)?this.readGeometryFromDocument(t,i):this.readGeometryFromNode(t,i)}return null},i.prototype.readGeometryFromDocument=function(t,i){return null},i.prototype.readGeometryFromNode=function(t,i){return null},i.prototype.readProjection=function(t){if(t){if("string"==typeof t){var i=(0,a.Qc)(t);return this.readProjectionFromDocument(i)}return(0,a.qk)(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},i.prototype.readProjectionFromDocument=function(t){return this.dataProjection},i.prototype.readProjectionFromNode=function(t){return this.dataProjection},i.prototype.writeFeature=function(t,i){var e=this.writeFeatureNode(t,i);return this.ao.serializeToString(e)},i.prototype.writeFeatureNode=function(t,i){return null},i.prototype.writeFeatures=function(t,i){var e=this.writeFeaturesNode(t,i);return this.ao.serializeToString(e)},i.prototype.writeFeaturesNode=function(t,i){return null},i.prototype.writeGeometry=function(t,i){var e=this.writeGeometryNode(t,i);return this.ao.serializeToString(e)},i.prototype.writeGeometryNode=function(t,i){return null},i}(n.ZP);i.Z=u},60588:function(t,i,e){"use strict";e.d(i,{Q:function(){return n}});function n(t){return t.getAttributeNS("http://www.w3.org/1999/xlink","href")}},87349:function(t,i,e){"use strict";e.d(i,{ud:function(){return s},v$:function(){return o},x7:function(){return a},fy:function(){return u},ej:function(){return h},$L:function(){return f},_E:function(){return c},s2:function(){return l},Vi:function(){return d},xO:function(){return v},hv:function(){return p},f3:function(){return m},JD:function(){return y},bZ:function(){return g}});var n=e(39360),r=e(94918);function s(t){return o((0,n.Ve)(t,!1))}function o(t){var i=/^\s*(true|1)|(false|0)\s*$/.exec(t);return i?void 0!==i[1]||!1:void 0}function a(t){var i=(0,n.Ve)(t,!1),e=Date.parse(i);return isNaN(e)?void 0:e/1e3}function u(t){return h((0,n.Ve)(t,!1))}function h(t){var i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(t);return i?parseFloat(i[1]):void 0}function f(t){return c((0,n.Ve)(t,!1))}function c(t){var i=/^\s*(\d+)\s*$/.exec(t);return i?parseInt(i[1],10):void 0}function l(t){return(0,n.Ve)(t,!1).trim()}function d(t,i){g(t,i?"1":"0")}function v(t,i){t.appendChild((0,n.Me)().createCDATASection(i))}function p(t,i){var e=new Date(1e3*i),s=e.getUTCFullYear()+"-"+(0,r.v)(e.getUTCMonth()+1,2)+"-"+(0,r.v)(e.getUTCDate(),2)+"T"+(0,r.v)(e.getUTCHours(),2)+":"+(0,r.v)(e.getUTCMinutes(),2)+":"+(0,r.v)(e.getUTCSeconds(),2)+"Z";t.appendChild((0,n.Me)().createTextNode(s))}function m(t,i){var e=i.toPrecision();t.appendChild((0,n.Me)().createTextNode(e))}function y(t,i){var e=i.toString();t.appendChild((0,n.Me)().createTextNode(e))}function g(t,i){t.appendChild((0,n.Me)().createTextNode(i))}},51287:function(t,i,e){"use strict";e.d(i,{uX:function(){return r},Dv:function(){return s},Zn:function(){return o},qe:function(){return a}});var n=e(95083);function r(){return!0}function s(){return!1}function o(){}function a(t){var i,e,r,s=!1;return function(){var o=Array.prototype.slice.call(arguments);return s&&this===r&&(0,n.fS)(o,e)||(s=!0,r=this,e=o,i=t.apply(this,arguments)),i}}},76736:function(t,i,e){"use strict";var n=e(32431),r=e(37766),s=e(85409),o=e(32662),a=e(35277),u=function(t){function i(i,e,n){if(t.call(this),void 0!==n&&void 0===e)this.setFlatCoordinates(n,i);else{var r=e||0;this.setCenterAndRadius(i,r,n)}}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.clone=function(){var t=new i(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},i.prototype.closestPointXY=function(t,i,e,n){var r=this.flatCoordinates,s=t-r[0],o=i-r[1],a=s*s+o*o;if(a=e[0]||(t[1]<=e[1]&&t[3]>=e[1]||(0,s.H6)(t,this.intersectsCoordinate.bind(this)))}return!1},i.prototype.setCenter=function(t){var i=this.stride,e=this.flatCoordinates[i]-this.flatCoordinates[0],n=t.slice();n[i]=n[0]+e;for(var r=1;r1)u=e;else{if(d>0){for(var v=0;vs&&(s=f),o=u,a=h}return s}function o(t,i,e,n,r){for(var o=0,a=e.length;os&&(h-a)*(s-u)-(r-a)*(f-u)>0&&o++:f<=s&&(h-a)*(s-u)-(r-a)*(f-u)<0&&o--,a=h,u=f}return 0!==o}function o(t,i,e,n,r,o){if(0===e.length)return!1;if(!s(t,i,e[0],n,r,o))return!1;for(var a=1,u=e.length;ax&&(c=(l+d)/2,(0,n.wY)(t,i,e,s,c,m)&&(M=c,x=k)),l=d}return isNaN(M)&&(M=o[a]),u?(u.push(M,m,x),u):[M,m,x]}function o(t,i,e,n,r){for(var o=[],a=0,u=e.length;a1?u:2,x=a||new Array(M),k=0;k>1;s=o[0]&&a[2]<=o[2]||(a[1]>=o[1]&&a[3]<=o[3]||(0,r.E)(t,i,e,s,(function(t,i){return(0,n.I7)(o,t,i)})))))}function a(t,i,e,n,r){for(var s=0,a=e.length;s0}function s(t,i,e,n,s){for(var o=void 0!==s&&s,a=0,u=e.length;a0;){for(var l=f.pop(),d=f.pop(),v=0,p=t[d],m=t[d+1],y=t[l],g=t[l+1],b=d+r;bv&&(c=b,v=x)}v>s&&(h[(c-i)/r]=1,d+r0&&m>v)&&(p<0&&y0&&y>p)?(u=l,h=d):(s[a++]=u,s[a++]=h,f=u,c=h,u=l,h=d)}}return s[a++]=u,s[a++]=h,a}function u(t,i,e,n,r,s,o,u){for(var h=0,f=e.length;h0&&this.Fo[e+2]>t;)e-=3;var n=this.Fo[i+2]-this.Fo[e+2];if(n<1e3/60)return!1;var r=this.Fo[i]-this.Fo[e],s=this.Fo[i+1]-this.Fo[e+1];return this.zo=Math.atan2(s,r),this.Uo=Math.sqrt(r*r+s*s)/n,this.Uo>this.Do},S.prototype.getDistance=function(){return(this.Do-this.Uo)/this.No},S.prototype.getAngle=function(){return this.zo};var E=S,T=e(93445),_=function(t){function i(i){var e=i||{},n=e;n.stopDown||(n.stopDown=h.Dv),t.call(this,n),this.Go=null,this.jo=void 0,this.Bo=!1,this.qo=0,this.Vo=void 0!==e.threshold?e.threshold:.3,this.$e=void 0!==e.duration?e.duration:250}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.handleDragEvent=function(t){var i=0,e=this.targetPointers[0],n=this.targetPointers[1],r=Math.atan2(n.clientY-e.clientY,n.clientX-e.clientX);if(void 0!==this.jo){var s=r-this.jo;this.qo+=s,!this.Bo&&Math.abs(this.qo)>this.Vo&&(this.Bo=!0),i=s}this.jo=r;var o=t.map,a=o.getView();if(a.getConstraints().rotation!==c.h$){var h=o.getViewport().getBoundingClientRect(),f=(0,u.S)(this.targetPointers);f[0]-=h.left,f[1]-=h.top,this.Go=o.getCoordinateFromPixelInternal(f),this.Bo&&(o.render(),a.adjustRotationInternal(i,this.Go))}},i.prototype.handleUpEvent=function(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.$e),!1)},i.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var i=t.map;return this.Go=null,this.jo=void 0,this.Bo=!1,this.qo=0,this.handlingDownUpSequence||i.getView().beginInteraction(),!0}return!1},i}(u.Z),A=e(62975);function O(t){var i=t||{},e=new n.Z,r=new E(-.005,.05,100);return(void 0===i.altShiftDragRotate||i.altShiftDragRotate)&&e.push(new l),(void 0===i.doubleClickZoom||i.doubleClickZoom)&&e.push(new o({delta:i.zoomDelta,duration:i.zoomDuration})),(void 0===i.dragPan||i.dragPan)&&e.push(new a.Z({onFocusOnly:i.onFocusOnly,kinetic:r})),(void 0===i.pinchRotate||i.pinchRotate)&&e.push(new _),(void 0===i.pinchZoom||i.pinchZoom)&&e.push(new A.Z({duration:i.zoomDuration})),(void 0===i.keyboard||i.keyboard)&&(e.push(new x),e.push(new k({delta:i.zoomDelta,duration:i.zoomDuration}))),(void 0===i.mouseWheelZoom||i.mouseWheelZoom)&&e.push(new T.Z({onFocusOnly:i.onFocusOnly,duration:i.zoomDuration})),(void 0===i.shiftDragZoom||i.shiftDragZoom)&&e.push(new p({duration:i.zoomDuration})),e}},72442:function(t,i,e){"use strict";var n=e(38048),r=e(79021),s=e(53907),o=e(68190),a=e(51287),u=e(62896),h=e(19079),f="addfeatures",c=function(t){function i(i,e,n,r){t.call(this,i),this.features=n,this.file=e,this.projection=r}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(n.ZP),l=function(t){function i(i){var e=i||{};t.call(this,{handleEvent:a.uX}),this.on,this.once,this.un,this.Zo=!1,this.$o=[];for(var n=e.formatConstructors?e.formatConstructors:[],r=0,o=n.length;r0){this.En&&(this.En.clear(),this.En.addFeatures(v)),this.dispatchEvent(new c(f,t,v,o));break}}},i.prototype.Xo=function(){var t=this.getMap();if(t){var i=this.target?this.target:t.getViewport();this.Wo=[(0,h.oL)(i,r.Z.DROP,this.handleDrop,this),(0,h.oL)(i,r.Z.DRAGENTER,this.handleStop,this),(0,h.oL)(i,r.Z.DRAGOVER,this.handleStop,this),(0,h.oL)(i,r.Z.DROP,this.handleStop,this)]}},i.prototype.setActive=function(i){!this.getActive()&&i&&this.Xo(),this.getActive()&&!i&&this.Jo(),t.prototype.setActive.call(this,i)},i.prototype.setMap=function(i){this.Jo(),t.prototype.setMap.call(this,i),this.getActive()&&this.Xo()},i.prototype.Yo=function(t,i,e){try{return t.readFeatures(i,e)}catch(t){return null}},i.prototype.Jo=function(){this.Wo&&(this.Wo.forEach(h.bN),this.Wo=null)},i.prototype.handleDrop=function(t){for(var i=t.dataTransfer.files,e=0,n=i.length;e=this.ra},i.prototype.getGeometry=function(){return this.na.getGeometry()},i.prototype.handleDragEvent=function(t){this.na.setPixels(this.ta,t.pixel),this.dispatchEvent(new d(f,t.coordinate,t))},i.prototype.handleUpEvent=function(t){this.na.setMap(null);var i=this.sa(t,this.ta,t.pixel);return i&&this.onBoxEnd(t),this.dispatchEvent(new d(i?c:l,t.coordinate,t)),!1},i.prototype.handleDownEvent=function(t){return!!this.Oo(t)&&(this.ta=t.pixel,this.na.setMap(t.map),this.na.setPixels(this.ta,this.ta),this.dispatchEvent(new d(h,t.coordinate,t)),!0)},i.prototype.onBoxEnd=function(t){},i}(r.Z)},60977:function(t,i,e){"use strict";var n=e(42280),r=e(51287),s=e(50314),o=e(85832),a=e(22942),u=function(t){function i(i){t.call(this,{stopDown:r.Dv});var e=i||{};this.oa=e.kinetic,this.lastCentroid=null,this.aa,this.ua=!1;var n=e.condition?e.condition:(0,s.$6)(s.rM,s.Xp);this.Oo=e.onFocusOnly?(0,s.$6)(s.yZ,n):n,this.ha=!1}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.handleDragEvent=function(t){this.ua||(this.ua=!0,this.getMap().getView().beginInteraction());var i=this.targetPointers,e=(0,n.S)(i);if(i.length==this.aa){if(this.oa&&this.oa.update(e[0],e[1]),this.lastCentroid){var r=[this.lastCentroid[0]-e[0],e[1]-this.lastCentroid[1]],s=t.map.getView();(0,a.bA)(r,s.getResolution()),(0,a.U1)(r,s.getRotation()),s.adjustCenterInternal(r)}}else this.oa&&this.oa.begin();this.lastCentroid=e,this.aa=i.length,t.originalEvent.preventDefault()},i.prototype.handleUpEvent=function(t){var i=t.map,e=i.getView();if(0===this.targetPointers.length){if(!this.ha&&this.oa&&this.oa.end()){var n=this.oa.getDistance(),r=this.oa.getAngle(),s=e.getCenterInternal(),a=i.getPixelFromCoordinateInternal(s),u=i.getCoordinateFromPixelInternal([a[0]-n*Math.cos(r),a[1]-n*Math.sin(r)]);e.animateInternal({center:e.getConstrainedCenter(u),duration:500,easing:o.Vv})}return this.ua&&(this.ua=!1,e.endInteraction()),!1}return this.oa&&this.oa.begin(),this.lastCentroid=null,!0},i.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&this.Oo(t)){var i=t.map.getView();return this.lastCentroid=null,i.getAnimating()&&i.cancelAnimations(),this.oa&&this.oa.begin(),this.ha=this.targetPointers.length>1,!0}return!1},i}(n.Z);i.Z=u},93457:function(t,i,e){"use strict";var n=e(42280),r=e(50314),s=function(t){function i(i){var e=i||{};t.call(this,e),this.Oo=e.condition?e.condition:r.vY,this.jo=void 0,this.fa=void 0,this.ca=0,this.$e=void 0!==e.duration?e.duration:400}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.handleDragEvent=function(t){if((0,r.QL)(t)){var i=t.map,e=i.getSize(),n=t.pixel,s=n[0]-e[0]/2,o=e[1]/2-n[1],a=Math.atan2(o,s),u=Math.sqrt(s*s+o*o),h=i.getView();if(void 0!==this.jo){var f=this.jo-a;h.adjustRotationInternal(f)}this.jo=a,void 0!==this.fa&&h.adjustResolutionInternal(this.fa/u),void 0!==this.fa&&(this.ca=this.fa/u),this.fa=u}},i.prototype.handleUpEvent=function(t){if(!(0,r.QL)(t))return!0;var i=t.map.getView(),e=this.ca>1?1:-1;return i.endInteraction(this.$e,e),this.ca=0,!1},i.prototype.handleDownEvent=function(t){return!!(0,r.QL)(t)&&(!!this.Oo(t)&&(t.map.getView().beginInteraction(),this.jo=void 0,this.fa=void 0,!0))},i}(n.Z);i.Z=s},41225:function(t,i,e){"use strict";e.d(i,{la:function(){return N},dO:function(){return D}});var n=e(76736),r=e(38048),s=e(79021),o=e(39352),a=e(32431),u=e(58006),h=e(61067),f=e(99030),c=e(76653),l=e(33796),d=e(69803),v=e(14415),p=e(92535),m=e(42280),y=e(60392),g=e(57356),b=e(96802),w=e(51287),M=e(50314),x=e(85409),k=e(12008),S=e(62896),E=e(22942),T="Point",_="LineString",A="Polygon",O="Circle",j="drawstart",C="drawend",I="drawabort",R=function(t){function i(i,e){t.call(this,i),this.feature=e}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(r.ZP),P=function(t){function i(i){var e=i;e.stopDown||(e.stopDown=w.Dv),t.call(this,e),this.on,this.once,this.un,this.da=!1,this.va=null,this.pa,this.ma,this.ya,this.ga=!1,this.En=i.source?i.source:null,this.ba=i.features?i.features:null,this.wa=i.snapTolerance?i.snapTolerance:12,this.Ma=i.type,this.xa=function(t){switch(t){case a.Z.POINT:case a.Z.MULTI_POINT:return T;case a.Z.LINE_STRING:case a.Z.MULTI_LINE_STRING:return _;case a.Z.POLYGON:case a.Z.MULTI_POLYGON:return A;case a.Z.CIRCLE:return O;default:throw new Error("Invalid type: "+t)}}(this.Ma),this.ka=!!i.stopClick,this.Sa=i.minPoints?i.minPoints:this.xa===A?3:2,this.Ea=this.xa===O?2:i.maxPoints?i.maxPoints:1/0,this.Ta=i.finishCondition?i.finishCondition:w.uX;var r,s=i.geometryFunction;if(!s){var o,f=this.xa;if(f===O)s=function(t,i,e){var r=i||new n.Z([NaN,NaN]),s=(0,S.Vs)(t[0],e),o=(0,E.bI)(s,(0,S.Vs)(t[t.length-1],e));r.setCenterAndRadius(s,Math.sqrt(o));var a=(0,S.Cs)();return a&&r.transform(e,a),r};else f===T?o=p.Z:f===_?o=h.Z:f===A&&(o=y.ZP),s=function(t,i,e){return i?f===A?t[0].length?i.setCoordinates([t[0].concat([t[0][0]])]):i.setCoordinates([]):i.setCoordinates(t):i=new o(t),i}}this._a=s,this.Aa=void 0!==i.dragVertexDelay?i.dragVertexDelay:500,this.Oa=null,this.ja=null,this.Ca=null,this.Ia=null,this.Ra=null,this.Pa=null,this.Na=i.clickTolerance?i.clickTolerance*i.clickTolerance:36,this.Da=new g.Z({source:new b.Z({useSpatialIndex:!1,wrapX:!!i.wrapX&&i.wrapX}),style:i.style?i.style:(r=(0,k.Ly)(),function(t,i){return r[t.getGeometry().getType()]}),updateWhileInteracting:!0}),this.H=i.geometryName,this.Oo=i.condition?i.condition:M.rM,this.La,i.freehand?this.La=M.Bx:this.La=i.freehandCondition?i.freehandCondition:M.vY,this.addChangeListener(u.Z.ACTIVE,this.Fa)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.setMap=function(i){t.prototype.setMap.call(this,i),this.Fa()},i.prototype.getOverlay=function(){return this.Da},i.prototype.handleEvent=function(i){i.originalEvent.type===s.Z.CONTEXTMENU&&i.originalEvent.preventDefault(),this.ga=this.xa!==T&&this.La(i);var e=i.type===c.Z.POINTERMOVE,n=!0;!this.ga&&this.ma&&i.type===c.Z.POINTERDRAG&&(Date.now()-this.ma>=this.Aa?(this.va=i.pixel,this.da=!this.ga,e=!0):this.ma=void 0,this.da&&void 0!==this.pa&&(clearTimeout(this.pa),this.pa=void 0));return this.ga&&i.type===c.Z.POINTERDRAG&&null!==this.ja?(this.za(i.coordinate),n=!1):this.ga&&i.type===c.Z.POINTERDOWN?n=!1:e&&this.getPointerCount()<2?(n=i.type===c.Z.POINTERMOVE)&&this.ga?(this.ri(i),this.da&&i.originalEvent.preventDefault()):("mouse"===i.originalEvent.pointerType||i.type===c.Z.POINTERDRAG&&void 0===this.pa)&&this.ri(i):i.type===c.Z.DBLCLICK&&(n=!1),t.prototype.handleEvent.call(this,i)&&n},i.prototype.handleDownEvent=function(t){return this.da=!this.ga,this.ga?(this.va=t.pixel,this.Oa||this.Ua(t.coordinate),!0):this.Oo(t)?(this.ma=Date.now(),this.pa=setTimeout(function(){this.ri(new f.Z(c.Z.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.Aa),this.va=t.pixel,!0):(this.ma=void 0,!1)},i.prototype.handleUpEvent=function(t){var i=!0;if(0===this.getPointerCount())if(this.pa&&(clearTimeout(this.pa),this.pa=void 0),this.ri(t),this.da){var e=!this.Oa;e&&this.Ua(t.coordinate),!e&&this.ga?this.finishDrawing():this.ga||e&&this.xa!==T||(this.Ga(t.pixel)?this.Ta(t)&&this.finishDrawing():this.za(t.coordinate)),i=!1}else this.ga&&this.abortDrawing();return!i&&this.ka&&t.preventDefault(),i},i.prototype.ri=function(t){if(this.ya=t.originalEvent.pointerType,this.va&&(!this.ga&&this.da||this.ga&&!this.da)){var i=this.va,e=t.pixel,n=i[0]-e[0],r=i[1]-e[1],s=n*n+r*r;if(this.da=this.ga?s>this.Na:s<=this.Na,!this.da)return}this.Oa?this.Ba(t.coordinate):this.qa(t.coordinate.slice())},i.prototype.Ga=function(t){var i=!1;if(this.ja){var e=!1,n=[this.Oa],r=this.xa;if(r===T)i=!0;else if(r===O)i=2===this.Ia.length;else if(r===_)e=this.Ia.length>this.Sa;else if(r===A){var s=this.Ia;e=s[0].length>this.Sa,n=[s[0][0],s[0][s[0].length-2]]}if(e)for(var o=this.getMap(),a=0,u=n.length;a=this.Ea&&(this.ga?e.pop():i=!0),e.push(t.slice()),this._a(e,n,r)):s===A&&((e=this.Ia[0]).length>=this.Ea&&(this.ga?e.pop():i=!0),e.push(t.slice()),i&&(this.Oa=e[0]),this._a(this.Ia,n,r)),this.qa(t.slice()),this.Va(),i&&this.finishDrawing()},i.prototype.removeLastPoint=function(){if(this.ja){var t,i=this.ja.getGeometry(),e=this.getMap().getView().getProjection(),n=this.xa;if(n===_||n===O){if((t=this.Ia).splice(-2,1),t.length>=2){this.Oa=t[t.length-2].slice();var r=this.Oa.slice();t[t.length-1]=r,this.qa(r)}this._a(t,i,e),i.getType()===a.Z.POLYGON&&this.Ra&&this.Za(i)}else if(n===A){(t=this.Ia[0]).splice(-2,1);var s=this.Ra.getGeometry();if(t.length>=2){var o=t[t.length-2].slice();t[t.length-1]=o,this.qa(o)}s.setCoordinates(t),this._a(this.Ia,i,e)}1===t.length&&this.abortDrawing(),this.Va()}},i.prototype.finishDrawing=function(){var t=this.$a();if(t){var i=this.Ia,e=t.getGeometry(),n=this.getMap().getView().getProjection();this.xa===_?(i.pop(),this._a(i,e,n)):this.xa===A&&(i[0].pop(),this._a(i,e,n),i=e.getCoordinates()),this.Ma===a.Z.MULTI_POINT?t.setGeometry(new d.Z([i])):this.Ma===a.Z.MULTI_LINE_STRING?t.setGeometry(new l.Z([i])):this.Ma===a.Z.MULTI_POLYGON&&t.setGeometry(new v.Z([i])),this.dispatchEvent(new R(C,t)),this.ba&&this.ba.push(t),this.En&&this.En.addFeature(t)}},i.prototype.$a=function(){this.Oa=null;var t=this.ja;return this.ja=null,this.Ca=null,this.Ra=null,this.Da.getSource().clear(!0),t},i.prototype.abortDrawing=function(){var t=this.$a();t&&this.dispatchEvent(new R(I,t))},i.prototype.appendCoordinates=function(t){var i,e=this.xa,n=!this.ja;if(n&&this.Ua(t[0]),e===_||e===O)i=this.Ia;else{if(e!==A)return;i=this.Ia&&this.Ia.length?this.Ia[0]:[]}n&&i.shift(),i.pop();for(var r=0;r=0;--n){for(var r=e[n],s=this.hu.length-1;s>=0;--s)this.hu[s][0]===r&&this.hu.splice(s,1);i.remove(r)}},i.prototype.setActive=function(i){this.Ja&&!i&&(this.Da.getSource().removeFeature(this.Ja),this.Ja=null),t.prototype.setActive.call(this,i)},i.prototype.setMap=function(i){this.Da.setMap(i),t.prototype.setMap.call(this,i)},i.prototype.getOverlay=function(){return this.Da},i.prototype.Mu=function(t){t.feature&&this.ba.push(t.feature)},i.prototype.xu=function(t){t.feature&&this.ba.remove(t.feature)},i.prototype.Su=function(t){this.ku(t.element)},i.prototype.Ha=function(t){if(!this.uu){var i=t.target;this.Cu(i),this.ku(i)}},i.prototype.Tu=function(t){var i=t.element;this.Cu(i)},i.prototype.cu=function(t,i){var e=i.getCoordinates(),n={feature:t,geometry:i,segment:[e,e]};this.su.insert(i.getExtent(),n)},i.prototype.vu=function(t,i){for(var e=i.getCoordinates(),n=0,r=e.length;n=0;--b)this.Du(r[b],s)}return!!this.Ja},i.prototype.handleUpEvent=function(t){for(var i=this.hu.length-1;i>=0;--i){var e=this.hu[i][0],n=e.geometry;if(n.getType()===u.Z.CIRCLE){var r=n.getCenter(),s=e.featureSegments[0],o=e.featureSegments[1];s.segment[0]=r,s.segment[1]=r,o.segment[0]=r,o.segment[1]=r,this.su.update((0,y.HK)(r),s);var a=n,h=(0,x.Cs)();if(h){var f=t.map.getView().getProjection();a=a.clone().transform(h,f),a=(0,M.Bb)(a).transform(f,h)}this.su.update(a.getExtent(),o)}else this.su.update((0,y.hI)(e.segment),e)}return this.nu&&(this.dispatchEvent(new A(_,this.nu,t)),this.nu=null),!1},i.prototype.ri=function(t){this.tu=t.pixel,this.Ou(t.pixel,t.map,t.coordinate)},i.prototype.Ou=function(t,i,e){var n,r,s=this,o=e||i.getCoordinateFromPixel(t),a=i.getView().getProjection();if(this.bu){var h="object"==typeof this.bu?function(t){return t===s.bu}:void 0;i.forEachFeatureAtPixel(t,(function(t,i,e){if((e=e||t.getGeometry()).getType()===u.Z.POINT&&(0,w.q9)(s.ba.getArray(),t)){r=e;var o=e.getFlatCoordinates().slice(0,2);n=[{feature:t,geometry:e,segment:[o,o]}]}return!0}),{layerFilter:h})}if(!n){var f=(0,x.dY)((0,y.HK)(o,S),a),c=i.getView().getResolution()*this.ou,l=(0,x.Fj)((0,y.f3)(f,c,S),a);n=this.su.getInExtent(l)}if(n&&n.length>0){var d=n.sort((function(t,i){return C(o,t,a)-C(o,i,a)}))[0],v=d.segment,p=I(o,d,a),m=i.getPixelFromCoordinate(p),b=(0,g.TE)(t,m);if(r||b<=this.ou){var M={};if(M[(0,k.sq)(v)]=!0,this.Au||(this.Ao[0]=p[0]-o[0],this.Ao[1]=p[1]-o[1]),d.geometry.getType()===u.Z.CIRCLE&&1===d.index)this.au=!0,this.Pu(p,[d.feature],[d.geometry]);else{var E=i.getPixelFromCoordinate(v[0]),T=i.getPixelFromCoordinate(v[1]),_=(0,g.bI)(m,E),A=(0,g.bI)(m,T);b=Math.sqrt(Math.min(_,A)),this.au=b<=this.ou,this.au&&(p=_>A?v[1]:v[0]),this.Pu(p,[d.feature],[d.geometry]);var O={};O[(0,k.sq)(d.geometry)]=!0;for(var j=1,R=n.length;j=0;--r)f=(e=l[r])[0],c=(0,k.sq)(f.feature),f.depth&&(c+="-"+f.depth.join("-")),c in d||(d[c]={}),0===e[1]?(d[c].right=f,d[c].index=f.index):1==e[1]&&(d[c].left=f,d[c].index=f.index+1);for(c in d){switch(h=d[c].right,o=d[c].left,(a=(s=d[c].index)-1)<0&&(a=0),t=i=(n=(f=void 0!==o?o:h).geometry).getCoordinates(),v=!1,n.getType()){case u.Z.MULTI_LINE_STRING:i[f.depth[0]].length>2&&(i[f.depth[0]].splice(s,1),v=!0);break;case u.Z.LINE_STRING:i.length>2&&(i.splice(s,1),v=!0);break;case u.Z.MULTI_POLYGON:t=t[f.depth[1]];case u.Z.POLYGON:(t=t[f.depth[0]]).length>4&&(s==t.length-1&&(s=0),t.splice(s,1),v=!0,0===s&&(t.pop(),t.push(t[0]),a=t.length-1))}if(v){this.Nu(n,i);var p=[];if(void 0!==o&&(this.su.remove(o),p.push(o.segment[0])),void 0!==h&&(this.su.remove(h),p.push(h.segment[1])),void 0!==o&&void 0!==h){var m={depth:f.depth,feature:f.feature,geometry:f.geometry,index:a,segment:p};this.su.insert((0,y.hI)(m.segment),m)}this.Lu(n,s,f.depth,-1),this.Ja&&(this.Da.getSource().removeFeature(this.Ja),this.Ja=null),l.length=0}}return v},i.prototype.Nu=function(t,i){this.uu=!0,t.setCoordinates(i),this.uu=!1},i.prototype.Lu=function(t,i,e,n){this.su.forEachInExtent(t.getExtent(),(function(r){r.geometry===t&&(void 0===e||void 0===r.depth||(0,w.fS)(r.depth,e))&&r.index>i&&(r.index+=n)}))},i}(c.Z);function j(t,i){return t.index-i.index}function C(t,i,e){var n=i.geometry;if(n.getType()===u.Z.CIRCLE){var r=n;if(1===i.index){var s=(0,x.Cs)();s&&(r=r.clone().transform(s,e));var o=(0,g.bI)(r.getCenter(),(0,x.Vs)(t,e)),a=Math.sqrt(o)-r.getRadius();return a*a}}var h=(0,x.Vs)(t,e);return E[0]=(0,x.Vs)(i.segment[0],e),E[1]=(0,x.Vs)(i.segment[1],e),(0,g.Bs)(h,E)}function I(t,i,e){var n=i.geometry;if(n.getType()===u.Z.CIRCLE&&1===i.index){var r=n,s=(0,x.Cs)();return s&&(r=r.clone().transform(s,e)),(0,x.lO)(r.getClosestPoint((0,x.Vs)(t,e)),e)}var o=(0,x.Vs)(t,e);return E[0]=(0,x.Vs)(i.segment[0],e),E[1]=(0,x.Vs)(i.segment[1],e),(0,x.lO)((0,g.oL)(o,E),e)}i.Z=O},93445:function(t,i,e){"use strict";var n=e(79021),r=e(68190),s=e(60251),o=e(50314),a=e(215),u="trackpad",h="wheel",f=function(t){function i(i){var e=i||{};t.call(this,e),this.zu=0,this.Uu=0,this.yo=void 0!==e.maxDelta?e.maxDelta:1,this.$e=void 0!==e.duration?e.duration:250,this.Gu=void 0!==e.timeout?e.timeout:80,this.Bu=void 0===e.useAnchor||e.useAnchor,this.qu=void 0!==e.constrainResolution&&e.constrainResolution;var n=e.condition?e.condition:o.Bx;this.Oo=e.onFocusOnly?(0,o.$6)(o.yZ,n):n,this.Vu=null,this.Zu=void 0,this.$u,this.xa=void 0,this.Wu=400,this.Hu,this.Ku=300}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.Yu=function(){this.Hu=void 0,this.getMap().getView().endInteraction(void 0,this.Uu?this.Uu>0?1:-1:0,this.Vu)},i.prototype.handleEvent=function(t){if(!this.Oo(t))return!0;if(t.type!==n.Z.WHEEL)return!0;var i,e=t.map,r=t.originalEvent;if(r.preventDefault(),this.Bu&&(this.Vu=t.coordinate),t.type==n.Z.WHEEL&&(i=r.deltaY,s.V&&r.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(i/=s.MP),r.deltaMode===WheelEvent.DOM_DELTA_LINE&&(i*=40)),0===i)return!1;this.Uu=i;var o=Date.now();void 0===this.Zu&&(this.Zu=o),(!this.xa||o-this.Zu>this.Wu)&&(this.xa=Math.abs(i)<4?u:h);var a=e.getView();if(this.xa===u&&!a.getConstrainResolution()&&!this.qu)return this.Hu?clearTimeout(this.Hu):(a.getAnimating()&&a.cancelAnimations(),a.beginInteraction()),this.Hu=setTimeout(this.Yu.bind(this),this.Gu),a.adjustZoom(-i/this.Ku,this.Vu),this.Zu=o,!1;this.zu+=i;var f=Math.max(this.Gu-(o-this.Zu),0);return clearTimeout(this.$u),this.$u=setTimeout(this.Xu.bind(this,e),f),!1},i.prototype.Xu=function(t){var i=t.getView();i.getAnimating()&&i.cancelAnimations();var e=-(0,a.uZ)(this.zu,-this.yo*this.Ku,this.yo*this.Ku)/this.Ku;(i.getConstrainResolution()||this.qu)&&(e=e?e>0?1:-1:0),(0,r.FW)(i,e,this.Vu,this.$e),this.xa=void 0,this.zu=0,this.Vu=null,this.Zu=void 0,this.$u=void 0},i.prototype.setMouseAnchor=function(t){this.Bu=t,t||(this.Vu=null)},i}(r.ZP);i.Z=f},62975:function(t,i,e){"use strict";var n=e(42280),r=e(51287),s=function(t){function i(i){var e=i||{},n=e;n.stopDown||(n.stopDown=r.Dv),t.call(this,n),this.Go=null,this.$e=void 0!==e.duration?e.duration:400,this.Ju=void 0,this.ca=1}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.handleDragEvent=function(t){var i=1,e=this.targetPointers[0],r=this.targetPointers[1],s=e.clientX-r.clientX,o=e.clientY-r.clientY,a=Math.sqrt(s*s+o*o);void 0!==this.Ju&&(i=this.Ju/a),this.Ju=a;var u=t.map,h=u.getView();1!=i&&(this.ca=i);var f=u.getViewport().getBoundingClientRect(),c=(0,n.S)(this.targetPointers);c[0]-=f.left,c[1]-=f.top,this.Go=u.getCoordinateFromPixelInternal(c),u.render(),h.adjustResolutionInternal(i,this.Go)},i.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var i=t.map.getView(),e=this.ca>1?1:-1;return i.endInteraction(this.$e,e),!1}return!0},i.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var i=t.map;return this.Go=null,this.Ju=void 0,this.ca=1,this.handlingDownUpSequence||i.getView().beginInteraction(),!0}return!1},i}(n.Z);i.Z=s},42280:function(t,i,e){"use strict";e.d(i,{S:function(){return a}});var n=e(68190),r=e(76653),s=e(79309),o=function(t){function i(i){var e=i||{};t.call(this,e),e.handleDownEvent&&(this.handleDownEvent=e.handleDownEvent),e.handleDragEvent&&(this.handleDragEvent=e.handleDragEvent),e.handleMoveEvent&&(this.handleMoveEvent=e.handleMoveEvent),e.handleUpEvent&&(this.handleUpEvent=e.handleUpEvent),e.stopDown&&(this.stopDown=e.stopDown),this.handlingDownUpSequence=!1,this.Qu={},this.targetPointers=[]}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getPointerCount=function(){return this.targetPointers.length},i.prototype.handleDownEvent=function(t){return!1},i.prototype.handleDragEvent=function(t){},i.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var i=!1;if(this.th(t),this.handlingDownUpSequence){if(t.type==r.Z.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==r.Z.POINTERUP){var e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==r.Z.POINTERDOWN){var n=this.handleDownEvent(t);this.handlingDownUpSequence=n,i=this.stopDown(n)}else t.type==r.Z.POINTERMOVE&&this.handleMoveEvent(t);return!i},i.prototype.handleMoveEvent=function(t){},i.prototype.handleUpEvent=function(t){return!1},i.prototype.stopDown=function(t){return t},i.prototype.th=function(t){if(function(t){var i=t.type;return i===r.Z.POINTERDOWN||i===r.Z.POINTERDRAG||i===r.Z.POINTERUP}(t)){var i=t.originalEvent,e=i.pointerId.toString();t.type==r.Z.POINTERUP?delete this.Qu[e]:(t.type==r.Z.POINTERDOWN||e in this.Qu)&&(this.Qu[e]=i),this.targetPointers=(0,s.KX)(this.Qu)}},i}(n.ZP);function a(t){for(var i=t.length,e=0,n=0,r=0;r=0;--n){var r=e[n];if(r!==this&&r instanceof i&&r.getStyle()&&-1!==r.getFeatures().getArray().lastIndexOf(t))return void t.setStyle(r.getStyle())}var s=(0,l.sq)(t);t.setStyle(m[s]),delete m[s]},i.prototype.yh=function(t){delete this.lh[(0,l.sq)(t)]},i.prototype.handleEvent=function(t){if(!this.Oo(t))return!0;var i=this.nh(t),e=this.sh(t),n=this.oh(t),r=!i&&!e&&!n,s=t.map,o=this.getFeatures(),a=[],u=[];if(r){(0,h.ZH)(this.lh),s.forEachFeatureAtPixel(t.pixel,function(t,i){if(this.uh(t,i))return u.push(t),this.dh(t,i),!this.ah}.bind(this),{layerFilter:this.fh,hitTolerance:this.hh});for(var f=o.getLength()-1;f>=0;--f){var l=o.item(f),d=u.indexOf(l);d>-1?u.splice(d,1):(o.remove(l),a.push(l))}0!==u.length&&o.extend(u)}else{s.forEachFeatureAtPixel(t.pixel,function(t,r){if(this.uh(t,r))return!i&&!n||(0,c.q9)(o.getArray(),t)?(e||n)&&(0,c.q9)(o.getArray(),t)&&(a.push(t),this.yh(t)):(u.push(t),this.dh(t,r)),!this.ah}.bind(this),{layerFilter:this.fh,hitTolerance:this.hh});for(var m=a.length-1;m>=0;--m)o.remove(a[m]);o.extend(u)}return(u.length>0||a.length>0)&&this.dispatchEvent(new p(v,u,a,t)),!0},i}(a.ZP);i.Z=y},79846:function(t,i,e){"use strict";var n=e(93357),r=e(79021),s=e(32431),o=e(42280),a=e(8870),u=e(13898),h=e(51287),f=e(85409),c=e(22942),l=e(60392),d=e(62896),v=e(77097),p=e(79309),m=e(19079);function y(t){return t.feature?t.feature:t.element?t.element:void 0}var g=[],b=function(t){function i(i){var e=i||{},n=e;n.handleDownEvent||(n.handleDownEvent=h.uX),n.stopDown||(n.stopDown=h.Dv),t.call(this,n),this.En=e.source?e.source:null,this.gh=void 0===e.vertex||e.vertex,this.bh=void 0===e.edge||e.edge,this.ba=e.features?e.features:null,this.wh=[],this.Mh={},this.xh={},this.kh={},this.ou=void 0!==e.pixelTolerance?e.pixelTolerance:10,this.su=new a.Z,this.fu={Point:this.cu.bind(this),LineString:this.lu.bind(this),LinearRing:this.lu.bind(this),Polygon:this.du.bind(this),MultiPoint:this.vu.bind(this),MultiLineString:this.pu.bind(this),MultiPolygon:this.mu.bind(this),GeometryCollection:this.gu.bind(this),Circle:this.yu.bind(this)}}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.addFeature=function(t,i){var e=void 0===i||i,n=(0,v.sq)(t),s=t.getGeometry();if(s){var o=this.fu[s.getType()];o&&(this.xh[n]=s.getExtent((0,f.lJ)()),o(t,s))}e&&(this.Mh[n]=(0,m.oL)(t,r.Z.CHANGE,this.Ha,this))},i.prototype.Sh=function(t){this.addFeature(t)},i.prototype.Eh=function(t){this.removeFeature(t)},i.prototype.Th=function(){var t;return this.ba?t=this.ba:this.En&&(t=this.En.getFeatures()),t},i.prototype.handleEvent=function(i){var e=this.snapTo(i.pixel,i.coordinate,i.map);return e.snapped&&(i.coordinate=e.vertex.slice(0,2),i.pixel=e.vertexPixel),t.prototype.handleEvent.call(this,i)},i.prototype.Su=function(t){var i=y(t);this.addFeature(i)},i.prototype.Tu=function(t){var i=y(t);this.removeFeature(i)},i.prototype.Ha=function(t){var i=t.target;if(this.handlingDownUpSequence){var e=(0,v.sq)(i);e in this.kh||(this.kh[e]=i)}else this._h(i)},i.prototype.handleUpEvent=function(t){var i=(0,p.KX)(this.kh);return i.length&&(i.forEach(this._h.bind(this)),this.kh={}),!1},i.prototype.removeFeature=function(t,i){var e=void 0===i||i,n=(0,v.sq)(t),r=this.xh[n];if(r){var s=this.su,o=[];s.forEachInExtent(r,(function(i){t===i.feature&&o.push(i)}));for(var a=o.length-1;a>=0;--a)s.remove(o[a])}e&&((0,m.bN)(this.Mh[n]),delete this.Mh[n])},i.prototype.setMap=function(i){var e=this.getMap(),r=this.wh,s=this.Th();e&&(r.forEach(m.bN),r.length=0,s.forEach(this.Eh.bind(this))),t.prototype.setMap.call(this,i),i&&(this.ba?r.push((0,m.oL)(this.ba,n.Z.ADD,this.Su,this),(0,m.oL)(this.ba,n.Z.REMOVE,this.Tu,this)):this.En&&r.push((0,m.oL)(this.En,u.Z.ADDFEATURE,this.Su,this),(0,m.oL)(this.En,u.Z.REMOVEFEATURE,this.Tu,this)),s.forEach(this.Sh.bind(this)))},i.prototype.snapTo=function(t,i,e){var n=e.getCoordinateFromPixel([t[0]-this.ou,t[1]+this.ou]),r=e.getCoordinateFromPixel([t[0]+this.ou,t[1]-this.ou]),o=(0,f.hI)([n,r]),a=this.su.getInExtent(o);this.gh&&!this.bh&&(a=a.filter((function(t){return t.feature.getGeometry().getType()!==s.Z.CIRCLE})));var u=!1,h=null,l=null;if(0===a.length)return{snapped:u,vertex:h,vertexPixel:l};for(var v,p=e.getView().getProjection(),m=(0,d.Vs)(i,p),y=1/0,b=0;bT?x[1]:x[0],l=e.getPixelFromCoordinate(h))}else if(this.bh){var _=v.feature.getGeometry().getType()===s.Z.CIRCLE;if(_){var A=v.feature.getGeometry(),O=(0,d.Cs)();O&&(A=A.clone().transform(O,p)),h=(0,d.lO)((0,c.Ed)(m,A),p)}else g[0]=(0,d.Vs)(x[0],p),g[1]=(0,d.Vs)(x[1],p),h=(0,d.lO)((0,c.oL)(m,g),p);if(l=e.getPixelFromCoordinate(h),(0,c.TE)(t,l)<=this.ou&&(u=!0,this.gh&&!_)){var j=e.getPixelFromCoordinate(x[0]),C=e.getPixelFromCoordinate(x[1]),I=(0,c.bI)(l,j),R=(0,c.bI)(l,C);Math.sqrt(Math.min(I,R))<=this.ou&&(h=I>R?x[1]:x[0],l=e.getPixelFromCoordinate(h))}}return u&&(l=[Math.round(l[0]),Math.round(l[1])]),{snapped:u,vertex:h,vertexPixel:l}},i.prototype._h=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},i.prototype.yu=function(t,i){var e=this.getMap().getView().getProjection(),n=i,r=(0,d.Cs)();r&&(n=n.clone().transform(r,e));var s=(0,l.Bb)(n);r&&s.transform(e,r);for(var o=s.getCoordinates()[0],a=0,u=o.length-1;a0&&m.length>0;)s=m.pop(),f=v.pop(),l=p.pop(),(u=s.toString())in g||(h.push(l[0],l[1]),g[u]=!0),o=m.pop(),c=v.pop(),d=p.pop(),r=i(n=t(a=(s+o)/2)),(0,y.rU)(r[0],r[1],l[0],l[1],d[0],d[1])this.Mf.length;)h=new s.Z,this.Mf.push(h);var c=n.getFeaturesCollection();c.clear();var l,d,v=0;for(l=0,d=this.Xh.length;lMath.PI/2);for(var y=(0,w.u3)(t),g=c;g<=l;++g){var b=this.Xh.length+this.Jh.length,M=void 0,x=void 0,k=void 0,S=void 0;if(this.hf)for(x=0,k=this.hf.length;x=a?(t[0]=o[0],t[2]=o[2]):s=!0);var u=[(0,y.uZ)(i[0],this.Wh,this.qh),(0,y.uZ)(i[1],this.Hh,this.Vh)],h=this.if(u);isNaN(h[1])&&(h[1]=Math.abs(this.zh)>=Math.abs(this.Gh)?this.zh:this.Gh);var f,c,l,d,v=(0,y.uZ)(h[0],this.Bh,this.Uh),m=(0,y.uZ)(h[1],this.Gh,this.zh),g=this.Yh,b=t;s||(b=[(0,y.uZ)(t[0],this.Wh,this.qh),(0,y.uZ)(t[1],this.Hh,this.Vh),(0,y.uZ)(t[2],this.Wh,this.qh),(0,y.uZ)(t[3],this.Hh,this.Vh)]);var w=(0,p.Ne)(b,this.if,void 0,8),M=w[3],x=w[2],k=w[1],S=w[0];if(s||((0,p.b8)(b,this.nf)&&(S=this.Bh,k=this.Gh),(0,p.b8)(b,this.sf)&&(x=this.Uh,k=this.Gh),(0,p.b8)(b,this.af)&&(S=this.Bh,M=this.zh),(0,p.b8)(b,this.uf)&&(x=this.Uh,M=this.zh),M=(0,y.uZ)(M,m,this.zh),x=(0,y.uZ)(x,v,this.Uh),k=(0,y.uZ)(k,this.Gh,m),S=(0,y.uZ)(S,this.Bh,v)),v=Math.floor(v/r)*r,d=(0,y.uZ)(v,this.Bh,this.Uh),c=this.Of(d,k,M,n,t,0),f=0,s)for(;(d-=r)>=S&&f++n[s]&&(r=s,s=1);var o=Math.max(i[1],n[r]),a=Math.min(i[3],n[s]),u=(0,y.uZ)(i[1]+Math.abs(i[1]-i[3])*this.df,o,a),h=[n[r-1]+(n[s-1]-n[r-1])*(u-n[r])/(n[s]-n[r]),u],f=this.hf[e].geom;return f.setCoordinates(h),f},i.prototype.getMeridians=function(){return this.Xh},i.prototype.Rf=function(t,i,e,n,r){var s=function(t,i,e,n,r){var s=(0,b.U2)("EPSG:4326");return M((function(n){return[i+(e-i)*n,t]}),(0,b.Ck)(s,n),r)}(t,i,e,this.ve,n),o=this.Jh[r];return o?(o.setFlatCoordinates(a.Z.XY,s),o.changed()):o=new u.Z(s,a.Z.XY),o},i.prototype.Nf=function(t,i,e){var n=t.getFlatCoordinates(),r=0,s=n.length-2;n[r]>n[s]&&(r=s,s=0);var o=Math.max(i[0],n[r]),a=Math.min(i[2],n[s]),u=(0,y.uZ)(i[0]+Math.abs(i[0]-i[2])*this.vf,o,a),h=[u,n[r+1]+(n[s+1]-n[r+1])*(u-n[r])/(n[s]-n[r])],f=this.ff[e].geom;return f.setCoordinates(h),f},i.prototype.getParallels=function(){return this.Jh},i.prototype.Ef=function(t){var i=(0,b.U2)("EPSG:4326"),e=t.getWorldExtent();this.zh=e[3],this.Uh=e[2],this.Gh=e[1],this.Bh=e[0];var n=(0,b.Ck)(t,i);if(this.Bh=Math.abs(this.Gh)?this.zh:this.Gh),this.ve=t},i}(d.Z)},30652:function(t,i,e){"use strict";var n=e(26691),r=e(54009),s=e(93357),o=e(79021),a=e(36874),u=e(23448),h=e(97854),f=e(79309),c=e(85409),l=e(77097),d=e(19079),v="layers",p=function(t){function i(i){var e=i||{},n=(0,f.f0)({},e);delete n.layers;var s=e.layers;t.call(this,n),this.on,this.once,this.un,this.Ff=[],this.zf={},this.addChangeListener(v,this.Uf),s?Array.isArray(s)?s=new r.Z(s.slice(),{unique:!0}):(0,h.h)("function"==typeof s.getArray,43):s=new r.Z(void 0,{unique:!0}),this.setLayers(s)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.Gf=function(){this.changed()},i.prototype.Uf=function(){this.Ff.forEach(d.bN),this.Ff.length=0;var t=this.getLayers();for(var i in this.Ff.push((0,d.oL)(t,s.Z.ADD,this.Bf,this),(0,d.oL)(t,s.Z.REMOVE,this.Vf,this)),this.zf)this.zf[i].forEach(d.bN);(0,f.ZH)(this.zf);for(var e=t.getArray(),n=0,r=e.length;n=t.maxResolution)return!1;var n=i.zoom;return n>t.minZoom&&n<=t.maxZoom}i.Z=c},57182:function(t,i){"use strict";i.Z={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source"}},86395:function(t,i,e){"use strict";var n=e(62359),r=e(39305),s=function(t){function i(i){t.call(this,i)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.createRenderer=function(){return new r.Z(this)},i}(n.Z);i.Z=s},20316:function(t,i){"use strict";i.Z={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"}},57356:function(t,i,e){"use strict";var n=e(39125),r=e(66550),s=function(t){function i(i){t.call(this,i)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.createRenderer=function(){return new r.Z(this)},i}(n.Z);i.Z=s},21047:function(t,i,e){"use strict";e.d(i,{Z:function(){return p}});var n=e(39125),r=e(29780),s=e(66550),o=e(79021),a=e(43753),u=e(94343),h=e(78476),f=e(89500),c=e(44812),l=e(79309),d=e(85409),v=function(t){function i(i){t.call(this,i),this.Xf=new s.Z(i),this.Jf=i.getImageRatio(),this.Qf=(0,c.Ue)(),this.tc=null}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.disposeInternal=function(){this.Xf.dispose(),t.prototype.disposeInternal.call(this)},i.prototype.getFeatures=function(t){if(!this.Xf)return new Promise((function(t){return t([])}));var i=(0,c.nn)(this.Qf,(0,c.nn)(this.tc,t.slice()));return this.Xf.getFeatures(i)},i.prototype.handleFontsChanged=function(){this.Xf.handleFontsChanged()},i.prototype.prepareFrame=function(t){var i=t.pixelRatio,e=t.viewState,n=e.resolution,r=t.viewHints,s=this.Xf,v=t.extent;1!==this.Jf&&(v=v.slice(0),(0,d.H9)(v,this.Jf));var p=(0,d.dz)(v)/n,m=(0,d.Cr)(v)/n;if(!r[f.Z.ANIMATING]&&!r[f.Z.INTERACTING]&&!(0,d.xb)(v)){s.useContainer(null,null,1);var y=s.context,g=(0,l.f0)({},t,{declutterTree:new h(9),extent:v,size:[p,m],viewState:(0,l.f0)({},t.viewState,{rotation:0})}),b=new a.Z(v,n,i,y.canvas,(function(t){s.prepareFrame(g)&&s.replayGroupChanged&&(s.clipping=!1,s.renderFrame(g,null),s.renderDeclutter(g),t())}));b.addEventListener(o.Z.CHANGE,function(){if(b.getState()===u.Z.LOADED){this.gt=b;var t=b.getResolution(),n=b.getPixelRatio(),r=t*i/n;this.renderedResolution=r,this.Qf=(0,c.qC)(this.Qf,p/2,m/2,1/r,-1/r,0,-e.center[0],-e.center[1])}}.bind(this)),b.load()}return this.gt&&(this.tc=t.pixelToCoordinateTransform.slice()),!!this.gt},i.prototype.preRender=function(){},i.prototype.postRender=function(){},i.prototype.renderDeclutter=function(){},i.prototype.forEachFeatureAtCoordinate=function(i,e,n,r,s){return this.Xf?this.Xf.forEachFeatureAtCoordinate(i,e,n,r,s):t.prototype.forEachFeatureAtCoordinate.call(this,i,e,n,r,s)},i}(r.Z),p=function(t){function i(i){var e=i||{},n=(0,l.f0)({},e);delete n.imageRatio,t.call(this,n),this.ic=void 0!==e.imageRatio?e.imageRatio:1}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getImageRatio=function(){return this.ic},i.prototype.createRenderer=function(){return new v(this)},i}(n.Z)},98475:function(t,i,e){"use strict";e.d(i,{Z:function(){return A}});var n=e(39125),r=e(37264),s=e(14114),o=e(39305),a=e(79021),u=e(47957),h=e(20380),f="image",c="hybrid",l="vector",d=e(89500),v=e(17808),p=e(44812),m=e(85409),y=e(79309),g=e(10808),b=e(77097),w=e(19079),M=e(73926),x=e(22942),k={image:[u.Z.POLYGON,u.Z.CIRCLE,u.Z.LINE_STRING,u.Z.IMAGE,u.Z.TEXT],hybrid:[u.Z.POLYGON,u.Z.LINE_STRING],vector:[]},S={hybrid:[u.Z.IMAGE,u.Z.TEXT,u.Z.DEFAULT],vector:[u.Z.POLYGON,u.Z.CIRCLE,u.Z.LINE_STRING,u.Z.IMAGE,u.Z.TEXT,u.Z.DEFAULT]},E=function(t){function i(i){t.call(this,i),this.ec=this.nc.bind(this),this.sc=!1,this.oc,this.tc=null,this.uc,this.hc={},this.fc={},this.cc=(0,p.Ue)()}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.prepareTile=function(t,i,e,n){var r,s=(0,b.sq)(t),o=t.getState();return o!==h.Z.LOADED&&o!==h.Z.ERROR||!(s in this.fc)||((0,w.bN)(this.fc[s]),delete this.fc[s]),o!==h.Z.LOADED&&o!==h.Z.ERROR||(this.lc(t,i,e),this.dc(t)&&(r=!0,n&&(this.hc[s]=t))),r},i.prototype.getTile=function(i,e,n,r){var s=r.pixelRatio,o=r.viewState,u=o.resolution,f=o.projection,c=this.getLayer(),v=c.getSource().getTile(i,e,n,s,f);if(v.getState()0)i([]);else{var k=c.getTileCoordExtent(n.wrappedTileCoord),S=(0,m.rL)(k),E=[(l[0]-S[0])/f,(S[1]-l[1])/f],T=n.getSourceTiles().reduce((function(t,i){return t.concat(i.getFeatures())}),[]),_=n.hitDetectionImageData[s];if(!_&&!this.yc){var A=(0,M.Pq)(c.getTileSize(c.getZForResolution(f))),O=this.uc,j=[this.getRenderTransform(c.getTileCoordCenter(n.wrappedTileCoord),f,0,v.UN,A[0]*v.UN,A[1]*v.UN,0)];_=(0,v.TU)(A,j,T,r.getStyleFunction(),c.getTileCoordExtent(n.wrappedTileCoord),n.getReplayState(r).renderedResolution,O),n.hitDetectionImageData[s]=_}i((0,v.ix)(E,T,_))}}.bind(this))},i.prototype.handleFontsChanged=function(){(0,y.ZH)(this.hc);var t=this.getLayer();t.getVisible()&&void 0!==this.oc&&t.changed()},i.prototype.nc=function(t){this.renderIfReadyAndVisible()},i.prototype.renderDeclutter=function(t){var i=this.context,e=i.globalAlpha;i.globalAlpha=this.getLayer().getOpacity();for(var n=t.viewHints,r=!(n[d.Z.ANIMATING]||n[d.Z.INTERACTING]),s=this.renderedTiles,o=0,a=s.length;o=0;--f)h[f].execute(this.context,1,this.getTileRenderTransform(u,t),t.viewState.rotation,r,void 0,t.declutterTree)}i.globalAlpha=e},i.prototype.getTileRenderTransform=function(t,i){var e=i.pixelRatio,n=i.viewState,r=n.center,s=n.resolution,o=n.rotation,a=i.size,u=Math.round(a[0]*e),h=Math.round(a[1]*e),f=this.getLayer().getSource().getTileGridForProjection(i.viewState.projection),c=t.tileCoord,l=f.getTileCoordExtent(t.wrappedTileCoord),d=f.getTileCoordExtent(c,this.tmpExtent)[0]-l[0];return(0,p.Jp)((0,p.bA)(this.inversePixelTransform.slice(),1/e,1/e),this.getRenderTransform(r,s,o,e,u,h,d))},i.prototype.renderFrame=function(i,e){var n=i.viewHints,r=!(n[d.Z.ANIMATING]||n[d.Z.INTERACTING]);this.gc(r,i),t.prototype.renderFrame.call(this,i,e),this.tc=i.pixelToCoordinateTransform.slice(),this.uc=i.viewState.rotation;var s=this.getLayer(),o=s.getRenderMode(),a=s.getSource(),u=i.usedTiles[(0,b.sq)(a)];for(var h in this.hc)u&&h in u||delete this.hc[h];var f=this.context,c=f.globalAlpha;f.globalAlpha=s.getOpacity();for(var l=S[o],v=i.viewState.rotation,p=this.renderedTiles,m=[],y=[],g=p.length-1;g>=0;--g)for(var w=p[g],M=this.getTileRenderTransform(w,i),x=w.executorGroups[(0,b.sq)(s)],k=!1,E=0,T=x.length;E8){i.animate=!0;break}var n=this.hc[e];delete this.hc[e],this.vc(n,i)}},i.prototype.renderFeature=function(t,i,e,n,r){if(!e)return!1;var s=!1;if(Array.isArray(e))for(var o=0,a=e.length;o1&&!t.variables)throw new Error("Missing variables in style (expected "+n.variables+")");for(var p=function(i){var e=n.variables[i];if(!(e in t.variables))throw new Error("Missing '"+e+"' in style variables");var r=(0,s.aT)(e);d[r]=function(){var i=t.variables[e];return"string"==typeof i&&(i=(0,s.Ce)(n,i)),void 0!==i?i:-9999999}},m=0;m1?(e=r,n=s):h>0&&(e+=o*h,n+=u*h)}return a(t,i,e,n)}function a(t,i,e,n){var r=e-t,s=n-i;return r*r+s*s}function u(t){for(var i=t.length,e=0;er&&(r=o,n=s)}if(0===r)return null;var a=t[n];t[n]=t[e],t[e]=a;for(var u=e+1;u=0;l--){c[l]=t[l][i]/t[l][l];for(var d=l-1;d>=0;d--)t[d][i]-=t[d][l]*c[l]}return c}function h(t){return 180*t/Math.PI}function f(t){return t*Math.PI/180}function c(t,i){var e=t%i;return e*i<0?e+i:e}function l(t,i,e){return t+e*(i-t)}},36448:function(t,i,e){"use strict";e.d(i,{R6:function(){return r},xA:function(){return a},Kk:function(){return u}});var n=e(77097);function r(t,i,e,r){var s=document.createElement("script"),o="olc_"+(0,n.sq)(i);function a(){delete window[o],s.parentNode.removeChild(s)}s.async=!0,s.src=t+(-1==t.indexOf("?")?"?":"&")+(r||"callback")+"="+o;var u=setTimeout((function(){a(),e&&e()}),1e4);window[o]=function(t){clearTimeout(u),a(),i(t)},document.getElementsByTagName("head")[0].appendChild(s)}var s=function(t){function i(i){var e="Unexpected response status: "+i.status;t.call(this,e),this.name="ResponseError",this.response=i}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(Error),o=function(t){function i(i){t.call(this,"Failed to issue request"),this.name="ClientError",this.client=i}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(Error);function a(t){return new Promise((function(i,e){var n=new XMLHttpRequest;n.addEventListener("load",(function(t){var n=t.target;if(!n.status||n.status>=200&&n.status<300){var r;try{r=JSON.parse(n.responseText)}catch(t){var o="Error parsing response text as JSON: "+t.message;return void e(new Error(o))}i(r)}else e(new s(n))})),n.addEventListener("error",(function(t){e(new o(t.target))})),n.open("GET",t),n.setRequestHeader("Accept","application/json"),n.send()}))}function u(t,i){return i.indexOf("://")>=0?i:new URL(i,t).href}},79309:function(t,i,e){"use strict";e.d(i,{f0:function(){return n},ZH:function(){return r},KX:function(){return s},xb:function(){return o}});var n="function"==typeof Object.assign?Object.assign:function(t,i){var e=arguments;if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,s=arguments.length;r1?e:2,s=i;void 0===s&&(s=r>2?t.slice():new Array(n));for(var u=0;uf?h=f:h<-f&&(h=-f),s[u+1]=h}return s}function v(t,i,e){var n=t.length,r=e>1?e:2,s=i;void 0===s&&(s=r>2?t.slice():new Array(n));for(var u=0;u=2;--h)o[a+h]=i[a+h]}return o}}function I(t,i,e,n){var r=_(t),s=_(i);(0,w.IH)(r,s,C(e)),(0,w.IH)(s,r,C(n))}function R(t,i){return F(t,"EPSG:4326",void 0!==i?i:"EPSG:3857")}function P(t,i){var e=F(t,void 0!==i?i:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=(0,s.$W)(n+180,360)-180),e}function N(t,i){if(t===i)return!0;var e=t.getUnits()===i.getUnits();return(t.getCode()===i.getCode()||D(t,i)===S)&&e}function D(t,i){var e=t.getCode(),n=i.getCode(),r=(0,w.U2)(e,n);return r||(r=E),r}function L(t,i){return D(_(t),_(i))}function F(t,i,e){return L(i,e)(t,void 0,t.length)}function z(t,i,e,n){var r=L(i,e);return(0,M.Ne)(t,r,void 0,n)}var U,G,B,q=null;function V(){return q}function Z(){q=_("EPSG:4326")}function $(t,i){return q?F(t,i,q):t}function W(t,i){return q?F(t,q,i):t}function H(t,i){return q?z(t,i,q):t}function K(t,i){return q?z(t,q,i):t}function Y(t,i,e){return function(n){var r,o,a=n[0],u=n[1];if(t.canWrapX()){var h=t.getExtent(),f=(0,M.dz)(h);(o=(0,k.jk)(n,t,f))&&(a-=o*f),a=(0,s.uZ)(a,h[0],h[2]),u=(0,s.uZ)(u,h[1],h[3]),r=e([a,u])}else r=e(n);return o&&i.canWrapX()&&(r[0]+=o*(0,M.dz)(i.getExtent())),r}}O(l),O(g),U=l,G=d,B=v,g.forEach((function(t){U.forEach((function(i){(0,w.IH)(t,i,G),(0,w.IH)(i,t,B)}))}))},94707:function(t,i,e){"use strict";var n=e(37201),r=function(t){this.Ec=t.code,this.Tc=t.units,this.ho=void 0!==t.extent?t.extent:null,this._c=void 0!==t.worldExtent?t.worldExtent:null,this.Ac=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.Oc=void 0!==t.global&&t.global,this.jc=!(!this.Oc||!this.ho),this.Cc=t.getPointResolution,this.Ic=null,this.Rc=t.metersPerUnit};r.prototype.canWrapX=function(){return this.jc},r.prototype.getCode=function(){return this.Ec},r.prototype.getExtent=function(){return this.ho},r.prototype.getUnits=function(){return this.Tc},r.prototype.getMetersPerUnit=function(){return this.Rc||n.Wm[this.Tc]},r.prototype.getWorldExtent=function(){return this._c},r.prototype.getAxisOrientation=function(){return this.Ac},r.prototype.isGlobal=function(){return this.Oc},r.prototype.setGlobal=function(t){this.Oc=t,this.jc=!(!t||!this.ho)},r.prototype.getDefaultTileGrid=function(){return this.Ic},r.prototype.setDefaultTileGrid=function(t){this.Ic=t},r.prototype.setExtent=function(t){this.ho=t,this.jc=!(!this.Oc||!t)},r.prototype.setWorldExtent=function(t){this._c=t},r.prototype.setGetPointResolution=function(t){this.Cc=t},r.prototype.getPointResolutionFunc=function(){return this.Cc},i.Z=r},37201:function(t,i,e){"use strict";e.d(i,{Ne:function(){return s},Wm:function(){return o}});var n={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},r={9001:n.METERS,9002:n.FEET,9003:n.USFEET,9101:n.RADIANS,9102:n.DEGREES};function s(t){return r[t]}var o={};o[n.RADIANS]=6370997/(2*Math.PI),o[n.DEGREES]=2*Math.PI*6370997/360,o[n.FEET]=.3048,o[n.METERS]=1,o[n.USFEET]=1200/3937,i.ZP=n},32377:function(t,i,e){"use strict";e.d(i,{z:function(){return a}});var n=e(94707),r=e(37201),s=e(62896),o=e(71490);function a(t){var i,e,a=Object.keys(t.defs),u=a.length;for(i=0;id&&this.instructions.push([n.ZP.CUSTOM,d,o,t,e,c.Ml])):f==r.Z.POINT&&(s=t.getFlatCoordinates(),this.coordinates.push(s[0],s[1]),o=this.coordinates.length,this.instructions.push([n.ZP.CUSTOM,d,o,t,e]));this.endGeometry(i)},i.prototype.beginGeometry=function(t,i){this.Lc=[n.ZP.BEGIN_GEOMETRY,i,0,t],this.instructions.push(this.Lc),this.Fc=[n.ZP.BEGIN_GEOMETRY,i,0,t],this.hitDetectionInstructions.push(this.Fc)},i.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},i.prototype.reverseHitDetectionInstructions=function(){var t,i=this.hitDetectionInstructions;i.reverse();var e,r,s=i.length,o=-1;for(t=0;tthis.maxLineWidth&&(this.maxLineWidth=e.lineWidth,this.zc=null)}else e.strokeStyle=void 0,e.lineCap=void 0,e.lineDash=null,e.lineDashOffset=void 0,e.lineJoin=void 0,e.lineWidth=void 0,e.miterLimit=void 0},i.prototype.createFill=function(t){var i=t.fillStyle,e=[n.ZP.SET_FILL_STYLE,i];return"string"!=typeof i&&e.push(!0),e},i.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},i.prototype.createStroke=function(t){return[n.ZP.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},i.prototype.updateFillStyle=function(t,i){var e=t.fillStyle;"string"==typeof e&&t.currentFillStyle==e||(void 0!==e&&this.instructions.push(i.call(this,t)),t.currentFillStyle=e)},i.prototype.updateStrokeStyle=function(t,i){var e=t.strokeStyle,n=t.lineCap,r=t.lineDash,s=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=e||t.currentLineCap!=n||r!=t.currentLineDash&&!(0,f.fS)(t.currentLineDash,r)||t.currentLineDashOffset!=s||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=u)&&(void 0!==e&&i.call(this,t),t.currentStrokeStyle=e,t.currentLineCap=n,t.currentLineDash=r,t.currentLineDashOffset=s,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=u)},i.prototype.endGeometry=function(t){this.Lc[2]=this.instructions.length,this.Lc=null,this.Fc[2]=this.hitDetectionInstructions.length,this.Fc=null;var i=[n.ZP.END_GEOMETRY,t];this.instructions.push(i),this.hitDetectionInstructions.push(i)},i.prototype.getBufferedMaxExtent=function(){if(!this.zc&&(this.zc=(0,u.d9)(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;(0,u.f3)(this.zc,t,this.zc)}return this.zc},i}(o.Z);i.Z=l},37264:function(t,i,e){"use strict";e.d(i,{Z:function(){return d}});var n=e(75513),r=e(4264),s=function(t){function i(i,e,n,r){t.call(this,i,e,n,r),this.Bc=null,this.gt=null,this.qc=void 0,this.Vc=void 0,this.Zc=void 0,this.$c=void 0,this.Wc=void 0,this.Hc=void 0,this.Kc=void 0,this.Dn=void 0,this.Ke=void 0,this.Xc=void 0,this.Jc=void 0,this.tl=void 0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.drawPoint=function(t,i){if(this.gt){this.beginGeometry(t,i);var e=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(e,n);this.instructions.push([r.ZP.DRAW_IMAGE,s,o,this.gt,this.Vc*this.qc,this.Zc*this.qc,Math.ceil(this.$c*this.qc),this.Wc,this.Hc,this.Kc,this.Dn,this.Ke,[this.Xc[0]*this.pixelRatio/this.qc,this.Xc[1]*this.pixelRatio/this.qc],Math.ceil(this.Jc*this.qc),this.tl]),this.hitDetectionInstructions.push([r.ZP.DRAW_IMAGE,s,o,this.Bc,this.Vc,this.Zc,this.$c,this.Wc,this.Hc,this.Kc,this.Dn,this.Ke,this.Xc,this.Jc,this.tl]),this.endGeometry(i)}},i.prototype.drawMultiPoint=function(t,i){if(this.gt){this.beginGeometry(t,i);var e=t.getFlatCoordinates(),n=t.getStride(),s=this.coordinates.length,o=this.appendFlatPointCoordinates(e,n);this.instructions.push([r.ZP.DRAW_IMAGE,s,o,this.gt,this.Vc*this.qc,this.Zc*this.qc,Math.ceil(this.$c*this.qc),this.Wc,this.Hc,this.Kc,this.Dn,this.Ke,[this.Xc[0]*this.pixelRatio/this.qc,this.Xc[1]*this.pixelRatio/this.qc],Math.ceil(this.Jc*this.qc),this.tl]),this.hitDetectionInstructions.push([r.ZP.DRAW_IMAGE,s,o,this.Bc,this.Vc,this.Zc,this.$c,this.Wc,this.Hc,this.Kc,this.Dn,this.Ke,this.Xc,this.Jc,this.tl]),this.endGeometry(i)}},i.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.Vc=void 0,this.Zc=void 0,this.Bc=null,this.gt=null,this.qc=void 0,this.$c=void 0,this.Xc=void 0,this.Wc=void 0,this.Hc=void 0,this.Kc=void 0,this.Dn=void 0,this.Ke=void 0,this.Jc=void 0,t.prototype.finish.call(this)},i.prototype.setImageStyle=function(t,i){var e=t.getAnchor(),n=t.getSize(),r=t.getHitDetectionImage(),s=t.getImage(this.pixelRatio),o=t.getOrigin();this.qc=t.getPixelRatio(this.pixelRatio),this.Vc=e[0],this.Zc=e[1],this.Bc=r,this.gt=s,this.$c=n[1],this.Wc=t.getOpacity(),this.Hc=o[0]*this.qc,this.Kc=o[1]*this.qc,this.Dn=t.getRotateWithView(),this.Ke=t.getRotation(),this.Xc=t.getScaleArray(),this.Jc=n[0],this.tl=i},i}(n.Z),o=e(80745),a=function(t){function i(i,e,n,r){t.call(this,i,e,n,r)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.el=function(t,i,e,n){var s=this.coordinates.length,o=this.appendFlatLineCoordinates(t,i,e,n,!1,!1),a=[r.ZP.MOVE_TO_LINE_TO,s,o];return this.instructions.push(a),this.hitDetectionInstructions.push(a),e},i.prototype.drawLineString=function(t,i){var e=this.state,n=e.strokeStyle,s=e.lineWidth;if(void 0!==n&&void 0!==s){this.updateStrokeStyle(e,this.applyStroke),this.beginGeometry(t,i),this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,o.X9,o.He],r.$O);var a=t.getFlatCoordinates(),u=t.getStride();this.el(a,0,a.length,u),this.hitDetectionInstructions.push(r.Yc),this.endGeometry(i)}},i.prototype.drawMultiLineString=function(t,i){var e=this.state,n=e.strokeStyle,s=e.lineWidth;if(void 0!==n&&void 0!==s){this.updateStrokeStyle(e,this.applyStroke),this.beginGeometry(t,i),this.hitDetectionInstructions.push([r.ZP.SET_STROKE_STYLE,e.strokeStyle,e.lineWidth,e.lineCap,e.lineJoin,e.miterLimit,e.lineDash,e.lineDashOffset],r.$O);for(var o=t.getEnds(),a=t.getFlatCoordinates(),u=t.getStride(),h=0,f=0,c=o.length;fj[2]}else _=x>A;var C,I=Math.PI,R=[],P=S+n===i;if(g=0,b=E,v=t[i=S],p=t[i+1],P){w();var N=Math.atan2(p-y,v-m);_&&(N+=N>0?-I:I);var D=(A+x)/2,L=(O+k)/2;return R[0]=[D,L,(T-s)/2,N,r],R}for(var F=0,z=r.length;F0?-I:I),void 0!==C){var G=U-C;if(G+=G>I?-2*I:G<-I?2*I:0,Math.abs(G)>o)return null}C=U;for(var B=F,q=0;Ft?t-f:r,_=s+c>i?i-c:s,A=w[3]+T*d[0]+w[1],O=w[0]+_*d[1]+w[2],j=S-w[3],C=E-w[0];return(M||0!==l)&&(m[0]=j,b[0]=j,m[1]=C,y[1]=C,y[0]=j+A,g[0]=y[0],g[1]=C+O,b[1]=g[1]),0!==l?(k=(0,a.qC)((0,a.Ue)(),e,n,1,1,l,-e,-n),(0,a.nn)(k,m),(0,a.nn)(k,y),(0,a.nn)(k,g),(0,a.nn)(k,b),(0,u.T9)(Math.min(m[0],y[0],g[0],b[0]),Math.min(m[1],y[1],g[1],b[1]),Math.max(m[0],y[0],g[0],b[0]),Math.max(m[1],y[1],g[1],b[1]),p)):(0,u.T9)(Math.min(j,j+A),Math.min(C,C+O),Math.max(j,j+A),Math.max(C,C+O),p),v&&(S=Math.round(S),E=Math.round(E)),{drawImageX:S,drawImageY:E,drawImageW:T,drawImageH:_,originX:f,originY:c,declutterBox:{minX:p[0],minY:p[1],maxX:p[2],maxY:p[3],value:x},canvasTransform:k,scale:d}},k.prototype.kl=function(t,i,e,n,r,s,o){var a=!(!s&&!o),u=n.declutterBox,f=t.canvas,c=o?o[2]*n.scale[0]/2:0;return u.minX-c<=f.width/i&&u.maxX+c>=0&&u.minY-c<=f.height/i&&u.maxY+c>=0&&(a&&this.gl(t,m,y,g,b,s,o),(0,h._f)(t,n.canvasTransform,r,e,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0},k.prototype.bl=function(t){if(this.hl){var i=(0,a.nn)(this.cl,[0,0]),e=512*this.pixelRatio;t.save(),t.translate(i[0]%e,i[1]%e),t.rotate(this.pl)}t.fill(),this.hl&&t.restore()},k.prototype.wl=function(t,i){t.strokeStyle=i[1],t.lineWidth=i[2],t.lineCap=i[3],t.lineJoin=i[4],t.miterLimit=i[5],t.setLineDash&&(t.lineDashOffset=i[7],t.setLineDash(i[6]))},k.prototype.Sl=function(t,i,e,n){var r=this.textStates[i],o=this.createLabel(t,i,n,e),a=this.strokeStates[e],u=this.pixelRatio,f=x(t,r.textAlign||h.PH),c=s.I[r.textBaseline||h.ru],l=a&&a.lineWidth?a.lineWidth:0;return{label:o,anchorX:f*(o.width/u-2*r.scale[0])+2*(.5-f)*l,anchorY:c*o.height/u+2*(.5-c)*l}},k.prototype.El=function(t,i,e,n,o,f,p,m){var y;this.vl&&(0,d.fS)(e,this.cl)?y=this.vl:(this.vl||(this.vl=[]),y=(0,c.vT)(this.coordinates,0,this.coordinates.length,2,e,this.vl),(0,a.lk)(this.cl,e));for(var g,b,M,x,k,S,E,T,_,A,O,j,C,I,R,P,N=0,D=n.length,L=0,F=0,z=0,U=null,G=null,B=this.fl,q=this.pl,V=Math.round(1e12*Math.atan2(-e[1],e[0]))/1e12,Z={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:q},$=this.instructions!=n||this.overlaps?0:200;N$&&(this.bl(t),F=0),z>$&&(t.stroke(),z=0),F||z||(t.beginPath(),x=NaN,k=NaN),++N;break;case r.ZP.CIRCLE:var H=y[L=W[1]],K=y[L+1],Y=y[L+2]-H,X=y[L+3]-K,J=Math.sqrt(Y*Y+X*X);t.moveTo(H+J,K),t.arc(H,K,J,0,2*Math.PI,!0),++N;break;case r.ZP.CLOSE_PATH:t.closePath(),++N;break;case r.ZP.CUSTOM:L=W[1],g=W[2];var Q=W[3],tt=W[4],it=6==W.length?W[5]:void 0;Z.geometry=Q,Z.feature=C,N in B||(B[N]=[]);var et=B[N];it?it(y,L,g,2,et):(et[0]=y[L],et[1]=y[L+1],et.length=2),tt(et,Z),++N;break;case r.ZP.DRAW_IMAGE:L=W[1],g=W[2],T=W[3],b=W[4],M=W[5];var nt=W[6],rt=W[7],st=W[8],ot=W[9],at=W[10],ut=W[11],ht=W[12],ft=W[13],ct=W[14];if(!T&&W.length>=19){_=W[18],A=W[19],O=W[20],j=W[21];var lt=this.Sl(_,A,O,j);T=lt.label,W[3]=T;var dt=W[22];b=(lt.anchorX-dt)*this.pixelRatio,W[4]=b;var vt=W[23];M=(lt.anchorY-vt)*this.pixelRatio,W[5]=M,nt=T.height,W[6]=nt,ft=T.width,W[13]=ft}var pt=void 0;W.length>24&&(pt=W[24]);var mt=void 0,yt=void 0,gt=void 0;W.length>16?(mt=W[15],yt=W[16],gt=W[17]):(mt=h.oB,yt=!1,gt=!1),at&&V?ut+=q:at||V||(ut-=q);for(var bt=0;Le)break;var a=n[o];a||(a=[],n[o]=a),a.push(4*((t+r)*i+(t+s))+3),r>0&&a.push(4*((t-r)*i+(t+s))+3),s>0&&(a.push(4*((t+r)*i+(t-s))+3),r>0&&a.push(4*((t-r)*i+(t-s))+3))}for(var u=[],h=0,f=n.length;h0){if(!o||p!==n.Z.IMAGE&&p!==n.Z.TEXT||-1!==o.indexOf(t)){var f=(m[a]-3)/4,c=r-f%h,l=r-(f/h|0),d=s(t,i,c*c+l*l);if(d)return d}v.clearRect(0,0,h,h);break}}var g,b,w,M,x,k=Object.keys(this.Al).map(Number);for(k.sort(d.kK),g=k.length-1;g>=0;--g){var S=k[g].toString();for(w=this.Al[S],b=_.length-1;b>=0;--b)if(void 0!==(M=w[p=_[b]])&&(x=M.executeHitDetection(v,f,e,y,l)))return x}},A.prototype.getClipCoords=function(t){var i=this.ol;if(!i)return null;var e=i[0],n=i[1],r=i[2],s=i[3],o=[e,n,e,s,r,s,r,n];return(0,c.vT)(o,0,8,2,t,o),o},A.prototype.isEmpty=function(){return(0,T.xb)(this.Al)},A.prototype.execute=function(t,i,e,n,r,s,o){var a=Object.keys(this.Al).map(Number);a.sort(d.kK),this.ol&&(t.save(),this.clip(t,e));var u,h,f,c,l,v,p=s||_;for(o&&a.reverse(),u=0,h=a.length;ut&&(y>m&&(m=y,v=g,p=s),y=0,g=s-r)),o=a,f=l,c=d),u=b,h=w}return(y+=a)>m?[g,s]:[v,p]}var l={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},d=function(t){function i(i,e,n,r){t.call(this,i,e,n,r),this.yl=null,this.td="",this.ed=0,this.nd=0,this.sd=void 0,this.od=0,this.fd=null,this.fillStates={},this.ld=null,this.strokeStates={},this.vd={},this.textStates={},this.Sd="",this.Td="",this._d="",this.tl=void 0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.finish=function(){var i=t.prototype.finish.call(this);return i.textStates=this.textStates,i.fillStates=this.fillStates,i.strokeStates=this.strokeStates,i},i.prototype.drawText=function(t,i){var e=this.fd,n=this.ld,a=this.vd;if(""!==this.td&&a&&(e||n)){var h=this.coordinates,l=h.length,d=t.getType(),v=null,p=t.getStride();if(a.placement!==o.Z.LINE||d!=s.Z.LINE_STRING&&d!=s.Z.MULTI_LINE_STRING&&d!=s.Z.POLYGON&&d!=s.Z.MULTI_POLYGON){var m=a.overflow?null:[];switch(d){case s.Z.POINT:case s.Z.MULTI_POINT:v=t.getFlatCoordinates();break;case s.Z.LINE_STRING:v=t.getFlatMidpoint();break;case s.Z.CIRCLE:v=t.getCenter();break;case s.Z.MULTI_LINE_STRING:v=t.getFlatMidpoints(),p=2;break;case s.Z.POLYGON:v=t.getFlatInteriorPoint(),a.overflow||m.push(v[2]/this.resolution),p=3;break;case s.Z.MULTI_POLYGON:var y=t.getFlatInteriorPoints();v=[];for(var g=0,b=y.length;g=0;--S){var E=b[S],T=E.layer;if(T.hasRenderer()&&(0,h.j)(E,l)&&o.call(u,T)){var _=T.getRenderer(),A=T.getSource();if(_&&A){var O=A.getWrapX()?p:t,j=d.bind(null,E.managed);x[0]=O[0]+m[k][0],x[1]=O[1]+m[k][1],c=_.forEachFeatureAtCoordinate(x,i,e,j,M)}if(c)return c}}if(0!==M.length){var C=1/M.length;return M.forEach((function(t,i){return t.distanceSq+=i*C})),M.sort((function(t,i){return t.distanceSq-i.distanceSq})),M.some((function(t){return c=t.callback(t.feature,t.layer,t.geometry)})),c}},i.prototype.forEachLayerAtPixel=function(t,i,e,n,r){return(0,s.O3)()},i.prototype.hasFeatureAtCoordinate=function(t,i,e,n,s,o){return void 0!==this.forEachFeatureAtCoordinate(t,i,e,n,r.uX,this,s,o)},i.prototype.getMap=function(){return this.Lt},i.prototype.renderFrame=function(t){(0,s.O3)()},i.prototype.scheduleExpireIconCache=function(t){u.c.canExpireCache()&&t.postRenderFunctions.push(c)},i}(n.Z),d=e(36874),v=e(17983),p=e(3520),m=e(23448),y=e(78657),g=e(80745),b=e(19079),w=e(70956),M=function(t){function i(i){t.call(this,i),this.jd=(0,b.oL)(g.sG,d.Z.PROPERTYCHANGE,i.redrawText.bind(i)),this.$t=document.createElement("div");var e=this.$t.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.$t.className=y.XV+" ol-layers";var n=i.getViewport();n.insertBefore(this.$t,n.firstChild||null),this.Cd=[],this.cn=!0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.dispatchRenderEvent=function(t,i){var e=this.getMap();if(e.hasListener(t)){var n=new v.Z(t,void 0,i);e.dispatchEvent(n)}},i.prototype.disposeInternal=function(){(0,b.bN)(this.jd),this.$t.parentNode.removeChild(this.$t),t.prototype.disposeInternal.call(this)},i.prototype.renderFrame=function(t){if(t){this.calculateMatrices2D(t),this.dispatchRenderEvent(p.Z.PRECOMPOSE,t);var i=t.layerStatesArray.sort((function(t,i){return t.zIndex-i.zIndex})),e=t.viewState;this.Cd.length=0;for(var n=[],r=null,s=0,o=i.length;s=0;--c)n[c].renderDeclutter(t);(0,w.hF)(this.$t,this.Cd),this.dispatchRenderEvent(p.Z.POSTCOMPOSE,t),this.cn||(this.$t.style.display="",this.cn=!0),this.scheduleExpireIconCache(t)}else this.cn&&(this.$t.style.display="none",this.cn=!1)},i.prototype.forEachLayerAtPixel=function(t,i,e,n,r){for(var s=i.viewState,o=i.layerStatesArray,a=o.length-1;a>=0;--a){var u=o[a],f=u.layer;if(f.hasRenderer()&&(0,h.j)(u,s)&&r(f)){var c=f.getRenderer().getDataAtPixel(t,i,e);if(c){var l=n(f,c);if(l)return l}}}},i}(l)},48292:function(t,i,e){"use strict";var n=e(79021),r=e(94343),s=e(57899),o=e(23448),a=e(77097),u=function(t){function i(i){t.call(this),this.Rd=this.Pd.bind(this),this.Nd=i,this.declutterExecutorGroup=null}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getFeatures=function(t){return(0,a.O3)()},i.prototype.prepareFrame=function(t){return(0,a.O3)()},i.prototype.renderFrame=function(t,i){return(0,a.O3)()},i.prototype.loadedTileCallback=function(t,i,e){t[i]||(t[i]={}),t[i][e.tileCoord.toString()]=e},i.prototype.createLoadedTileFinder=function(t,i,e){return function(n,r){var s=this.loadedTileCallback.bind(this,e,n);return t.forEachLoadedTile(i,n,r,s)}.bind(this)},i.prototype.forEachFeatureAtCoordinate=function(t,i,e,n,r){},i.prototype.getDataAtPixel=function(t,i,e){return(0,a.O3)()},i.prototype.getLayer=function(){return this.Nd},i.prototype.handleFontsChanged=function(){},i.prototype.Pd=function(t){t.target.getState()===r.Z.LOADED&&this.renderIfReadyAndVisible()},i.prototype.loadImage=function(t){var i=t.getState();return i!=r.Z.LOADED&&i!=r.Z.ERROR&&t.addEventListener(n.Z.CHANGE,this.Rd),i==r.Z.IDLE&&(t.load(),i=t.getState()),i==r.Z.LOADED},i.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==o.Z.READY&&t.changed()},i}(s.Z);i.Z=u},29780:function(t,i,e){"use strict";var n=e(90631),r=e(89500),s=e(69437),o=e(79309),a=e(44812),u=e(85409),h=e(62896),f=function(t){function i(i){t.call(this,i),this.gt=null}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getImage=function(){return this.gt?this.gt.getImage():null},i.prototype.prepareFrame=function(t){var i=t.layerStatesArray[t.layerIndex],e=t.pixelRatio,n=t.viewState,o=n.resolution,a=this.getLayer().getSource(),f=t.viewHints,c=t.extent;if(void 0!==i.extent&&(c=(0,u.Ed)(c,(0,h.dY)(i.extent,n.projection))),!f[r.Z.ANIMATING]&&!f[r.Z.INTERACTING]&&!(0,u.xb)(c))if(a){var l=n.projection;if(!s.j){var d=a.getProjection();d&&(l=d)}var v=a.getImage(c,o,e,l);v&&this.loadImage(v)&&(this.gt=v)}else this.gt=null;return!!this.gt},i.prototype.renderFrame=function(t,i){var e=this.gt,n=e.getExtent(),r=e.getResolution(),s=e.getPixelRatio(),f=t.layerStatesArray[t.layerIndex],c=t.pixelRatio,l=t.viewState,d=l.center,v=l.resolution,p=t.size,m=c*r/(v*s),y=Math.round(p[0]*c),g=Math.round(p[1]*c),b=l.rotation;if(b){var w=Math.round(Math.sqrt(y*y+g*g));y=w,g=w}(0,a.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/c,1/c,b,-y/2,-g/2),(0,a.nb)(this.inversePixelTransform,this.pixelTransform);var M=(0,a.BB)(this.pixelTransform);this.useContainer(i,M,f.opacity);var x=this.context,k=x.canvas;k.width!=y||k.height!=g?(k.width=y,k.height=g):this.containerReused||x.clearRect(0,0,y,g);var S=!1,E=!0;if(f.extent){var T=(0,h.dY)(f.extent,l.projection);(S=(E=(0,u.kK)(T,t.extent))&&!(0,u.r4)(T,t.extent))&&this.clipUnrotated(x,t,T)}var _=e.getImage(),A=(0,a.qC)(this.tempTransform,y/2,g/2,m,m,0,s*(n[0]-d[0])/r,s*(d[1]-n[3])/r);this.renderedResolution=r*c/s;var O=_.width*A[0],j=_.height*A[3];if((0,o.f0)(x,this.getLayer().getSource().getContextOptions()),this.preRender(x,t),E&&O>=.5&&j>=.5){var C,I=A[4],R=A[5],P=f.opacity;1!==P&&(C=x.globalAlpha,x.globalAlpha=P),x.drawImage(_,0,0,+_.width,+_.height,Math.round(I),Math.round(R),Math.round(O),Math.round(j)),1!==P&&(x.globalAlpha=C)}return this.postRender(x,t),S&&x.restore(),M!==k.style.transform&&(k.style.transform=M),this.container},i}(n.Z);i.Z=f},90631:function(t,i,e){"use strict";var n=e(48292),r=e(17983),s=e(3520),o=e(44812),a=e(85409),u=e(70956),h=function(t){function i(i){t.call(this,i),this.container=null,this.renderedResolution,this.tempTransform=(0,o.Ue)(),this.pixelTransform=(0,o.Ue)(),this.inversePixelTransform=(0,o.Ue)(),this.context=null,this.containerReused=!1}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.useContainer=function(t,i,e){var n,r,s=this.getLayer().getClassName();if(t&&""===t.style.opacity&&t.className===s){var o=t.firstElementChild;o instanceof HTMLCanvasElement&&(r=o.getContext("2d"))}if(!r||0!==r.canvas.width&&r.canvas.style.transform!==i?this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1):(this.container=t,this.context=r,this.containerReused=!0),!this.container){(n=document.createElement("div")).className=s;var a=n.style;a.position="absolute",a.width="100%",a.height="100%";var h=(r=(0,u.E4)()).canvas;n.appendChild(h),(a=h.style).position="absolute",a.left="0",a.transformOrigin="top left",this.container=n,this.context=r}},i.prototype.clipUnrotated=function(t,i,e){var n=(0,a.rL)(e),r=(0,a.Xv)(e),s=(0,a.w$)(e),u=(0,a.hC)(e);(0,o.nn)(i.coordinateToPixelTransform,n),(0,o.nn)(i.coordinateToPixelTransform,r),(0,o.nn)(i.coordinateToPixelTransform,s),(0,o.nn)(i.coordinateToPixelTransform,u);var h=this.inversePixelTransform;(0,o.nn)(h,n),(0,o.nn)(h,r),(0,o.nn)(h,s),(0,o.nn)(h,u),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(u[0]),Math.round(u[1])),t.clip()},i.prototype.Dd=function(t,i,e){var n=this.getLayer();if(n.hasListener(t)){var s=new r.Z(t,this.inversePixelTransform,e,i);n.dispatchEvent(s)}},i.prototype.preRender=function(t,i){this.Dd(s.Z.PRERENDER,t,i)},i.prototype.postRender=function(t,i){this.Dd(s.Z.POSTRENDER,t,i)},i.prototype.getRenderTransform=function(t,i,e,n,r,s,a){var u=r/2,h=s/2,f=n/i,c=-f,l=-t[0]+a,d=-t[1];return(0,o.qC)(this.tempTransform,u,h,f,c,-e,l,d)},i.prototype.getDataAtPixel=function(t,i,e){var n,r=(0,o.nn)(this.inversePixelTransform,t.slice()),s=this.context,u=this.getLayer().getExtent();if(u){var h=(0,o.nn)(i.pixelToCoordinateTransform,t.slice());if(!(0,a.b8)(u,h))return null}try{var f=Math.round(r[0]),c=Math.round(r[1]),l=document.createElement("canvas"),d=l.getContext("2d");l.width=1,l.height=1,d.clearRect(0,0,1,1),d.drawImage(s.canvas,f,c,1,1,0,0,1,1),n=d.getImageData(0,0,1,1).data}catch(t){return"SecurityError"===t.name?new Uint8Array:n}return 0===n[3]?null:n},i}(n.Z);i.Z=h},39305:function(t,i,e){"use strict";var n=e(90631),r=e(5891),s=e(20380),o=e(44812),a=e(79309),u=e(85409),h=e(62896),f=e(77097),c=e(95083),l=function(t){function i(i){t.call(this,i),this.extentChanged=!0,this.Sf=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedRevision,this.renderedTiles=[],this.Ld=!1,this.tmpExtent=(0,u.lJ)(),this.Fd=new r.Z(0,0,0,0)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.isDrawableTile=function(t){var i=this.getLayer(),e=t.getState(),n=i.getUseInterimTilesOnError();return e==s.Z.LOADED||e==s.Z.EMPTY||e==s.Z.ERROR&&!n},i.prototype.getTile=function(t,i,e,n){var r=n.pixelRatio,o=n.viewState.projection,a=this.getLayer(),u=a.getSource().getTile(t,i,e,r,o);return u.getState()==s.Z.ERROR&&(a.getUseInterimTilesOnError()?a.getPreload()>0&&(this.Ld=!0):u.setState(s.Z.LOADED)),this.isDrawableTile(u)||(u=u.getInterimTile()),u},i.prototype.loadedTileCallback=function(i,e,n){return!!this.isDrawableTile(n)&&t.prototype.loadedTileCallback.call(this,i,e,n)},i.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},i.prototype.renderFrame=function(t,i){var e=t.layerStatesArray[t.layerIndex],n=t.viewState,r=n.projection,l=n.resolution,d=n.center,v=n.rotation,p=t.pixelRatio,m=this.getLayer(),y=m.getSource(),g=y.getRevision(),b=y.getTileGridForProjection(r),w=b.getZForResolution(l,y.zDirection),M=b.getResolution(w),x=t.extent,k=e.extent&&(0,h.dY)(e.extent,r);k&&(x=(0,u.Ed)(x,(0,h.dY)(e.extent,r)));var S=y.getTilePixelRatio(p),E=Math.round(t.size[0]*S),T=Math.round(t.size[1]*S);if(v){var _=Math.round(Math.sqrt(E*E+T*T));E=_,T=_}var A=M*E/2/S,O=M*T/2/S,j=[d[0]-A,d[1]-O,d[0]+A,d[1]+O],C=b.getTileRangeForExtentAndZ(x,w),I={};I[w]={};var R=this.createLoadedTileFinder(y,r,I),P=this.tmpExtent,N=this.Fd;this.Ld=!1;for(var D=C.minX;D<=C.maxX;++D)for(var L=C.minY;L<=C.maxY;++L){var F=this.getTile(w,D,L,t);if(this.isDrawableTile(F)){var z=(0,f.sq)(this);if(F.getState()==s.Z.LOADED){I[w][F.tileCoord.toString()]=F;var U=F.inTransition(z);this.Ld||!U&&-1!==this.renderedTiles.indexOf(F)||(this.Ld=!0)}if(1===F.getAlpha(z,t.time))continue}var G=b.getTileCoordChildTileRange(F.tileCoord,N,P),B=!1;G&&(B=R(w+1,G)),B||b.forEachTileCoordParentTileRange(F.tileCoord,R,N,P)}var q=M/l;(0,o.qC)(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/S,1/S,v,-E/2,-T/2);var V=(0,o.BB)(this.pixelTransform);this.useContainer(i,V,e.opacity);var Z=this.context,$=Z.canvas;(0,o.nb)(this.inversePixelTransform,this.pixelTransform),(0,o.qC)(this.tempTransform,E/2,T/2,q,q,0,-E/2,-T/2),$.width!=E||$.height!=T?($.width=E,$.height=T):this.containerReused||Z.clearRect(0,0,E,T),k&&this.clipUnrotated(Z,t,k),(0,a.f0)(Z,y.getContextOptions()),this.preRender(Z,t),this.renderedTiles.length=0;var W,H,K,Y=Object.keys(I).map(Number);Y.sort(c.kK),1!==e.opacity||this.containerReused&&!y.getOpaque(t.viewState.projection)?(W=[],H=[]):Y=Y.reverse();for(var X=Y.length-1;X>=0;--X){var J=Y[X],Q=y.getTilePixelSize(J,p,r),tt=b.getResolution(J)/M,it=Q[0]*tt*q,et=Q[1]*tt*q,nt=b.getTileCoordForCoordAndZ((0,u.rL)(j),J),rt=b.getTileCoordExtent(nt),st=(0,o.nn)(this.tempTransform,[S*(rt[0]-j[0])/M,S*(j[3]-rt[3])/M]),ot=S*y.getGutterForProjection(r),at=I[J];for(var ut in at){var ht=at[ut],ft=ht.tileCoord,ct=nt[1]-ft[1],lt=Math.round(st[0]-(ct-1)*it),dt=nt[2]-ft[2],vt=Math.round(st[1]-(dt-1)*et),pt=Math.round(st[0]-ct*it),mt=Math.round(st[1]-dt*et),yt=lt-pt,gt=vt-mt,bt=w===J,wt=bt&&1!==ht.getAlpha((0,f.sq)(this),t.time);if(!wt)if(W){Z.save(),K=[pt,mt,pt+yt,mt,pt+yt,mt+gt,pt,mt+gt];for(var Mt=0,xt=W.length;Mt0&&(o.width=0),this.container;var c=Math.round(t.size[0]*e),d=Math.round(t.size[1]*e);o.width!=c||o.height!=d?(o.width=c,o.height=d,o.style.transform!==r&&(o.style.transform=r)):this.containerReused||s.clearRect(0,0,c,d),this.preRender(s,t);var v=t.viewState,p=v.projection,m=!1,y=!0;if(n.extent&&this.clipping){var g=(0,l.dY)(n.extent,p);(m=(y=(0,h.kK)(g,t.extent))&&!(0,h.r4)(g,t.extent))&&this.clipUnrotated(s,t,g)}y&&this.renderWorlds(a,t),m&&s.restore(),this.postRender(s,t);var b=n.opacity,w=this.container;return b!==parseFloat(w.style.opacity)&&(w.style.opacity=1===b?"":String(b)),this.uc!==v.rotation&&(this.uc=v.rotation,this.zd=null),this.container},i.prototype.getFeatures=function(t){return new Promise(function(i){if(!this.zd&&!this.yc){var e=[this.context.canvas.width,this.context.canvas.height];(0,u.nn)(this.pixelTransform,e);var n=this.Vd,r=this.Bd,s=this.uc,o=this.Zd,f=this.qd,c=this.getLayer(),l=[],d=e[0]*a.UN,v=e[1]*a.UN;l.push(this.getRenderTransform(n,r,s,a.UN,d,v,0).slice());var p=c.getSource(),m=o.getExtent();if(p.getWrapX()&&o.canWrapX()&&!(0,h.r4)(m,f)){for(var y,g=f[0],b=(0,h.dz)(m),w=0;gm[2];)y=b*++w,l.push(this.getRenderTransform(n,r,s,a.UN,d,v,y).slice()),g-=b}this.zd=(0,a.TU)(e,l,this.Ud,c.getStyleFunction(),f,r,s)}i((0,a.ix)(t,this.Ud,this.zd))}.bind(this))},i.prototype.forEachFeatureAtCoordinate=function(t,i,e,n,r){var s=this;if(this.Wd){var o,a=i.viewState.resolution,u=i.viewState.rotation,h=this.getLayer(),f={},c=function(t,i,e){var s=(0,d.sq)(t),o=f[s];if(o){if(!0!==o&&e_[0]&&j[2]>_[2]&&T.push([j[0]-A,j[1],j[2]-A,j[3]])}if(!this.sc&&this.Bd==g&&this.Gd==w&&this.$d==x&&(0,h.r4)(this.qd,S))return(0,c.fS)(this.Sf,E)||(this.zd=null,this.Sf=E),this.Vd=k,this.replayGroupChanged=!1,!0;this.Wd=null,this.sc=!1;var C,I=new n.Z((0,f.Qz)(g,b),S,g,b);this.getLayer().getDeclutter()&&(C=new n.Z((0,f.Qz)(g,b),S,g,b));var R,P=(0,l.Cs)();if(P){for(var N=0,D=T.length;Nthis.Jd[0]||i>=this.Jd[1])return f[0]=0,f[1]=0,f[2]=0,f[3]=0,f;this.readAll();var e=Math.floor(t)+(this.Jd[1]-Math.floor(i)-1)*this.Jd[0];return f[0]=this.Qd[4*e],f[1]=this.Qd[4*e+1],f[2]=this.Qd[4*e+2],f[3]=this.Qd[4*e+3],f},c.prototype.getTexture=function(){return this.Yd},c.prototype.getFramebuffer=function(){return this.Xd},c.prototype.iv=function(){var t=this.Jd,i=this.Hd.getGL();this.Yd=this.Hd.createTexture(t,null,this.Yd),i.bindFramebuffer(i.FRAMEBUFFER,this.Xd),i.viewport(0,0,t[0],t[1]),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,this.Yd,0),this.Qd=new Uint8Array(t[0]*t[1]*4)};var l=c,d=e(75110),v=e(97261),p=e(44812),m=e(97854),y=e(85409),g=new Blob(['var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r=s.minZoom;--Z){if(this.zv(s,q,Z,u))break}}this.helper.useProgram(this.av),this.helper.prepareDraw(t,!L);for(var $=Object.keys(u).map(Number).sort(S.kK),W=this.helper.getGL(),H=i.center[0],K=i.center[1],Y=0,X=$.length;Y2||Math.abs(t[4*i+3]-191.25)>2}function l(t,i,e,n){var r=(0,u.vs)(e,i,t),s=(0,u._Q)(i,n,e),a=i.getMetersPerUnit();void 0!==a&&(s*=a);var h=t.getMetersPerUnit();void 0!==h&&(s/=h);var f=t.getExtent();if(!f||(0,o.b8)(f,r)){var c=(0,u._Q)(t,s,r)/s;isFinite(c)&&c>0&&(s/=c)}return s}function d(t,i,e,n){var r=(0,o.qg)(e),s=l(t,i,r,n);return(!isFinite(s)||s<=0)&&(0,o.H6)(e,(function(e){return s=l(t,i,e,n),isFinite(s)&&s>0})),s}function v(t,i,e,u,l,d,v,p,m,y,g,b){var w=(0,a.E4)(Math.round(e*t),Math.round(e*i));if((0,s.f0)(w,b),0===m.length)return w.canvas;function M(t){return Math.round(t*e)/e}w.scale(e,e),w.globalCompositeOperation="lighter";var x=(0,o.lJ)();m.forEach((function(t,i,e){(0,o.l7)(x,t.extent)}));var k=(0,o.dz)(x),S=(0,o.Cr)(x),E=(0,a.E4)(Math.round(e*k/u),Math.round(e*S/u));(0,s.f0)(E,b);var T=e/u;m.forEach((function(t,i,e){var n=t.extent[0]-x[0],r=-(t.extent[3]-x[3]),s=(0,o.dz)(t.extent),a=(0,o.Cr)(t.extent);t.image.width>0&&t.image.height>0&&E.drawImage(t.image,y,y,t.image.width-2*y,t.image.height-2*y,n*T,r*T,s*T,a*T)}));var _=(0,o.rL)(v);return p.getTriangles().forEach((function(t,i,s){var o=t.source,a=t.target,l=o[0][0],v=o[0][1],p=o[1][0],m=o[1][1],y=o[2][0],g=o[2][1],k=M((a[0][0]-_[0])/d),S=M(-(a[0][1]-_[1])/d),T=M((a[1][0]-_[0])/d),A=M(-(a[1][1]-_[1])/d),O=M((a[2][0]-_[0])/d),j=M(-(a[2][1]-_[1])/d),C=l,I=v;l=0,v=0;var R=[[p-=C,m-=I,0,0,T-k],[y-=C,g-=I,0,0,O-k],[0,0,p,m,A-S],[0,0,y,g,j-S]],P=(0,h.SV)(R);if(P){if(w.save(),w.beginPath(),function(){if(void 0===n){var t=document.createElement("canvas").getContext("2d");t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",f(t,4,5,4,0),f(t,4,5,0,5);var i=t.getImageData(0,0,3,3).data;n=c(i,0)||c(i,4)||c(i,8)}return n}()||b===r.$){w.moveTo(T,A);for(var N=k-T,D=S-A,L=0;L<4;L++)w.lineTo(T+M((L+1)*N/4),A+M(L*D/3)),3!=L&&w.lineTo(T+M((L+1)*N/4),A+M((L+1)*D/3));w.lineTo(O,j)}else w.moveTo(T,A),w.lineTo(k,S),w.lineTo(O,j);w.clip(),w.transform(P[0],P[2],P[1],P[3],k,S),w.translate(x[0]-C,x[3]-I),w.scale(u/e,-u/e),w.drawImage(E.canvas,0,0),w.restore()}})),g&&(w.save(),w.globalCompositeOperation="source-over",w.strokeStyle="black",w.lineWidth=1,p.getTriangles().forEach((function(t,i,e){var n=t.target,r=(n[0][0]-_[0])/d,s=-(n[0][1]-_[1])/d,o=(n[1][0]-_[0])/d,a=-(n[1][1]-_[1])/d,u=(n[2][0]-_[0])/d,h=-(n[2][1]-_[1])/d;w.beginPath(),w.moveTo(o,a),w.lineTo(r,s),w.lineTo(u,h),w.closePath(),w.stroke()})),w.restore()),w.canvas}},42331:function(t,i,e){"use strict";var n=e(85409),r=e(62896),s=e(215),o=function(t,i,e,o,a,u){this.Uv=t,this.Gv=i;var h={},f=(0,r.Ck)(this.Gv,this.Uv);this.qv=function(t){var i=t[0]+"/"+t[1];return h[i]||(h[i]=f(t)),h[i]},this.Zv=o,this.Wv=a*a,this.Hv=[],this.Kv=!1,this.Yv=this.Uv.canWrapX()&&!!o&&!!this.Uv.getExtent()&&(0,n.dz)(o)==(0,n.dz)(this.Uv.getExtent()),this.Jv=this.Uv.getExtent()?(0,n.dz)(this.Uv.getExtent()):null,this.Qv=this.Gv.getExtent()?(0,n.dz)(this.Gv.getExtent()):null;var c=(0,n.rL)(e),l=(0,n.Xv)(e),d=(0,n.w$)(e),v=(0,n.hC)(e),p=this.qv(c),m=this.qv(l),y=this.qv(d),g=this.qv(v),b=10+(u?Math.max(0,Math.ceil((0,s.k3)((0,n.bg)(e)/(u*u*256*256)))):0);if(this.tp(c,l,d,v,p,m,y,g,b),this.Kv){var w=1/0;this.Hv.forEach((function(t,i,e){w=Math.min(w,t.source[0][0],t.source[1][0],t.source[2][0])})),this.Hv.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-w>this.Jv/2){var i=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];i[0][0]-w>this.Jv/2&&(i[0][0]-=this.Jv),i[1][0]-w>this.Jv/2&&(i[1][0]-=this.Jv),i[2][0]-w>this.Jv/2&&(i[2][0]-=this.Jv);var e=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-e.5&&l<1,p=!1;if(f>0){if(this.Gv.isGlobal()&&this.Qv){var m=(0,n.hI)([t,i,e,r]);p=(0,n.dz)(m)/this.Qv>.25||p}!v&&this.Uv.isGlobal()&&l&&(p=l>.25||p)}if(!(!p&&this.Zv&&isFinite(c[0])&&isFinite(c[1])&&isFinite(c[2])&&isFinite(c[3]))||(0,n.kK)(c,this.Zv)){var y=0;if(!(p||isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])&&isFinite(u[0])&&isFinite(u[1])&&isFinite(h[0])&&isFinite(h[1])))if(f>0)p=!0;else if(1!=(y=(isFinite(o[0])&&isFinite(o[1])?0:8)+(isFinite(a[0])&&isFinite(a[1])?0:4)+(isFinite(u[0])&&isFinite(u[1])?0:2)+(isFinite(h[0])&&isFinite(h[1])?0:1))&&2!=y&&4!=y&&8!=y)return;if(f>0){if(!p){var g,b=[(t[0]+e[0])/2,(t[1]+e[1])/2],w=this.qv(b);if(v)g=((0,s.$W)(o[0],d)+(0,s.$W)(u[0],d))/2-(0,s.$W)(w[0],d);else g=(o[0]+u[0])/2-w[0];var M=(o[1]+u[1])/2-w[1];p=g*g+M*M>this.Wv}if(p){if(Math.abs(t[0]-e[0])<=Math.abs(t[1]-e[1])){var x=[(i[0]+e[0])/2,(i[1]+e[1])/2],k=this.qv(x),S=[(r[0]+t[0])/2,(r[1]+t[1])/2],E=this.qv(S);this.tp(t,i,x,S,o,a,k,E,f-1),this.tp(S,x,e,r,E,k,u,h,f-1)}else{var T=[(t[0]+i[0])/2,(t[1]+i[1])/2],_=this.qv(T),A=[(e[0]+r[0])/2,(e[1]+r[1])/2],O=this.qv(A);this.tp(t,T,A,r,o,_,O,h,f-1),this.tp(T,i,e,A,_,a,u,O,f-1)}return}}if(v){if(!this.Yv)return;this.Kv=!0}0==(11&y)&&this.ip(t,e,r,o,u,h),0==(14&y)&&this.ip(t,e,i,o,u,a),y&&(0==(13&y)&&this.ip(i,r,t,a,h,o),0==(7&y)&&this.ip(i,r,e,a,h,u))}},o.prototype.calculateSourceExtent=function(){var t=(0,n.lJ)();return this.Hv.forEach((function(i,e,r){var s=i.source;(0,n.Wj)(t,s[0]),(0,n.Wj)(t,s[1]),(0,n.Wj)(t,s[2])})),t},o.prototype.getTriangles=function(){return this.Hv},i.Z=o},69437:function(t,i,e){"use strict";e.d(i,{m:function(){return n},j:function(){return r}});var n=.5,r=!0},34958:function(t,i,e){"use strict";e.d(i,{h$:function(){return r},YP:function(){return s},gE:function(){return o},Gw:function(){return a}});var n=e(215);function r(t){return void 0!==t?0:void 0}function s(t){return void 0!==t?t:void 0}function o(t){var i=2*Math.PI/t;return function(t,e){return e?t:void 0!==t?t=Math.floor(t/i+.5)*i:void 0}}function a(t){var i=t||(0,n.Yr)(5);return function(t,e){return e?t:void 0!==t?Math.abs(t)<=i?0:t:void 0}}},73926:function(t,i,e){"use strict";function n(t,i,e){return void 0===e&&(e=[0,0]),e[0]=t[0]+2*i,e[1]=t[1]+2*i,e}function r(t){return t[0]>0&&t[1]>0}function s(t,i,e){return void 0===e&&(e=[0,0]),e[0]=t[0]*i+.5|0,e[1]=t[1]*i+.5|0,e}function o(t,i){return Array.isArray(t)?t:(void 0===i?i=[t,t]:(i[0]=t,i[1]=t),i)}e.d(i,{f3:function(){return n},py:function(){return r},bA:function(){return s},Pq:function(){return o}})},30238:function(t,i,e){"use strict";var n=e(23448),r=e(65518),s=e(85409),o=e(27270),a=e(10056),u=e(61430),h=e(62896),f=e(36448);var c=function(t){function i(i){var e=void 0!==i.hidpi&&i.hidpi;t.call(this,{cacheSize:i.cacheSize,crossOrigin:"anonymous",imageSmoothing:i.imageSmoothing,opaque:!0,projection:(0,h.U2)("EPSG:3857"),reprojectionErrorThreshold:i.reprojectionErrorThreshold,state:n.Z.LOADING,tileLoadFunction:i.tileLoadFunction,tilePixelRatio:e?2:1,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:i.zDirection}),this.np=e,this.sp=void 0!==i.culture?i.culture:"en-us",this.op=void 0!==i.maxZoom?i.maxZoom:-1,this.ap=i.key,this.up=i.imagerySet;var r="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.up+"?uriScheme=https&include=ImageryProviders&key="+this.ap+"&c="+this.sp;(0,f.R6)(r,this.handleImageryMetadataResponse.bind(this),void 0,"jsonp")}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getApiKey=function(){return this.ap},i.prototype.getImagerySet=function(){return this.up},i.prototype.handleImageryMetadataResponse=function(t){if(200==t.statusCode&&"OK"==t.statusDescription&&"ValidCredentials"==t.authenticationResultCode&&1==t.resourceSets.length&&1==t.resourceSets[0].resources.length){var i=t.resourceSets[0].resources[0],e=-1==this.op?i.zoomMax:this.op,r=this.getProjection(),f=(0,u.Tl)(r),c=this.np?2:1,l=i.imageWidth==i.imageHeight?i.imageWidth/c:[i.imageWidth/c,i.imageHeight/c],d=(0,u.dl)({extent:f,minZoom:i.zoomMin,maxZoom:e,tileSize:l});this.tileGrid=d;var v=this.sp,p=this.np;if(this.tileUrlFunction=(0,o.Un)(i.imageUrlSubdomains.map((function(t){var e=[0,0,0],n=i.imageUrl.replace("{subdomain}",t).replace("{culture}",v);return function(t,i,r){if(t){(0,a.T9)(t[0],t[1],t[2],e);var s=n;return p&&(s+="&dpi=d1&device=mobile"),s.replace("{quadkey}",function(t){var i,e,n=t[0],r=new Array(n),s=1<>=1;return r.join("")}(e))}}}))),i.imageryProviders){var m=(0,h.WO)((0,h.U2)("EPSG:4326"),this.getProjection());this.setAttributions(function(t){var e=[],n=t.viewState,r=this.getTileGrid(),o=r.getZForResolution(n.resolution,this.zDirection),a=r.getTileCoordForCoordAndZ(n.center,o)[0];return i.imageryProviders.map((function(i){for(var n=!1,r=i.coverageAreas,o=0,u=r.length;o=h.zoomMin&&a<=h.zoomMax){var f=h.bbox,c=[f[1],f[0],f[3],f[2]],l=(0,s.Ne)(c,m);if((0,s.kK)(l,t.extent)){n=!0;break}}}n&&e.push(i.attribution)})),e.push('Terms of Use'),e}.bind(this))}this.setState(n.Z.READY)}else this.setState(n.Z.ERROR)},i}(r.Z);i.Z=c},94810:function(t,i,e){"use strict";var n=e(79021),r=e(39352),s=e(32431),o=e(92535),a=e(96802),u=e(22942),h=e(97854),f=e(85409),c=e(77097),l=function(t){function i(i){t.call(this,{attributions:i.attributions,wrapX:i.wrapX}),this.resolution=void 0,this.distance=void 0!==i.distance?i.distance:20,this.minDistance=i.minDistance||0,this.interpolationRatio=0,this.features=[],this.geometryFunction=i.geometryFunction||function(t){var i=t.getGeometry();return(0,h.h)(i.getType()==s.Z.POINT,10),i},this.hp=i.createCluster,this.source=null,this.fp=this.refresh.bind(this),this.updateDistance(this.distance,this.minDistance),this.setSource(i.source||null)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.clear=function(i){this.features.length=0,t.prototype.clear.call(this,i)},i.prototype.getDistance=function(){return this.distance},i.prototype.getSource=function(){return this.source},i.prototype.loadFeatures=function(t,i,e){this.source.loadFeatures(t,i,e),i!==this.resolution&&(this.resolution=i,this.refresh())},i.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},i.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},i.prototype.getMinDistance=function(){return this.minDistance},i.prototype.setSource=function(t){this.source&&this.source.removeEventListener(n.Z.CHANGE,this.fp),this.source=t,t&&t.addEventListener(n.Z.CHANGE,this.fp),this.refresh()},i.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},i.prototype.updateDistance=function(t,i){var e=0===t?0:Math.min(i,t)/t,n=t!==this.distance||this.interpolationRatio!==e;this.distance=t,this.minDistance=i,this.interpolationRatio=e,n&&this.refresh()},i.prototype.cluster=function(){if(void 0!==this.resolution&&this.source)for(var t=(0,f.lJ)(),i=this.distance*this.resolution,e=this.source.getFeatures(),n={},r=0,s=e.length;r=0;--n){var s=this.geometryFunction(t[n]);s?(0,u.IH)(e,s.getCoordinates()):t.splice(n,1)}(0,u.bA)(e,1/t.length);var a=(0,f.qg)(i),h=this.interpolationRatio,c=new o.Z([e[0]*(1-h)+a[0]*h,e[1]*(1-h)+a[1]*h]);return this.hp?this.hp(c,t):new r.Z({geometry:c,features:t})},i}(a.Z);i.Z=l},24867:function(t,i,e){"use strict";e.d(i,{Z:function(){return d}});var n=e(40886),r=e(20380),s=function(t){function i(i){var e=r.Z.IDLE;t.call(this,i.tileCoord,e,{transition:i.transition}),this.Tt=i.loader,this.Qd=null,this.At=null}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getData=function(){return this.Qd},i.prototype.getError=function(){return this.At},i.prototype.load=function(){this.state=r.Z.LOADING,this.changed();var t=this;this.Tt().then((function(i){t.Qd=i,t.state=r.Z.LOADED,t.changed()})).catch((function(i){t.At=i,t.state=r.Z.ERROR,t.changed()}))},i}(n.Z),o=e(79021),a=e(10089),u=e(14643),h=e(79309),f=e(61430),c=e(10056),l=e(77097),d=function(t){function i(i){var e=void 0===i.projection?"EPSG:3857":i.projection,n=i.tileGrid;void 0===n&&e&&(n=(0,f.dl)({extent:(0,f.Tl)(e),maxResolution:i.maxResolution,maxZoom:i.maxZoom,minZoom:i.minZoom,tileSize:i.tileSize})),t.call(this,{cacheSize:.1,projection:e,tileGrid:n,opaque:i.opaque,state:i.state,tilePixelRatio:i.tilePixelRatio,wrapX:i.wrapX,transition:i.transition}),this.cp={},this.Tt=i.loader,this.Ni=this.Ni.bind(this),this.bandCount=4}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.setLoader=function(t){this.Tt=t},i.prototype.getTile=function(t,i,e,n,r){var a=(0,c.lg)(t,i,e);if(this.tileCache.containsKey(a))return this.tileCache.get(a);var u=this.Tt;var f=new s((0,h.f0)({tileCoord:[t,i,e],loader:function(){return u(t,i,e)}},this.tileOptions));return f.key=this.getKey(),f.addEventListener(o.Z.CHANGE,this.Ni),this.tileCache.set(a,f),f},i.prototype.Ni=function(t){var i,e=t.target,n=(0,l.sq)(e),s=e.getState();s==r.Z.LOADING?(this.cp[n]=!0,i=a.Z.TILELOADSTART):n in this.cp&&(delete this.cp[n],i=s==r.Z.ERROR?a.Z.TILELOADERROR:s==r.Z.LOADED?a.Z.TILELOADEND:void 0),i&&this.dispatchEvent(new u.s(i,e))},i}(u.Z)},2159:function(t,i,e){"use strict";e.d(i,{Z:function(){return Ci}});var n=e(24867),r=e(23448),s=e(71840);const o=new ArrayBuffer(4),a=new Float32Array(o),u=new Uint32Array(o),h=new Uint32Array(512),f=new Uint32Array(512);for(let t=0;t<256;++t){const i=t-127;i<-27?(h[0|t]=0,h[256|t]=32768,f[0|t]=24,f[256|t]=24):i<-14?(h[0|t]=1024>>-i-14,h[256|t]=1024>>-i-14|32768,f[0|t]=-i-1,f[256|t]=-i-1):i<=15?(h[0|t]=i+15<<10,h[256|t]=i+15<<10|32768,f[0|t]=13,f[256|t]=13):i<128?(h[0|t]=31744,h[256|t]=64512,f[0|t]=24,f[256|t]=24):(h[0|t]=31744,h[256|t]=64512,f[0|t]=13,f[256|t]=13)}const c=new Uint32Array(2048),l=new Uint32Array(64),d=new Uint32Array(64);c[0]=0;for(let t=1;t<1024;++t){let i=t<<13,e=0;for(;0==(8388608&i);)e-=8388608,i<<=1;i&=-8388609,e+=947912704,c[t]=i|e}for(let t=1024;t<2048;++t)c[t]=939524096+(t-1024<<13);l[0]=0;for(let t=1;t<31;++t)l[t]=t<<23;l[31]=1199570944,l[32]=2147483648;for(let t=33;t<63;++t)l[t]=2147483648+(t-32<<23);l[63]=3347054592,d[0]=0;for(let t=1;t<64;++t)d[t]=32===t?0:1024;function v(t,i,...e){if(!(t instanceof DataView))throw new TypeError("First argument to getFloat16 function must be a DataView");return function(t){const i=t>>10;return u[0]=c[d[i]+(1023&t)]+l[i],a[0]}(t.getUint16(i,...e))}var p=e(21920),m=e.n(p);const y={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},g={};for(const t in y)y.hasOwnProperty(t)&&(g[y[t]]=parseInt(t,10));const b=[g.BitsPerSample,g.ExtraSamples,g.SampleFormat,g.StripByteCounts,g.StripOffsets,g.StripRowCounts,g.TileByteCounts,g.TileOffsets,g.SubIFDs],w={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},M={};for(const t in w)w.hasOwnProperty(t)&&(M[w[t]]=parseInt(t,10));const x=0,k=1,S=2,E=3,T=5,_=6,A=8,O=0,j=1,C=0,I=1,R={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},P={};for(const t in R)R.hasOwnProperty(t)&&(P[R[t]]=parseInt(t,10));function N(t,i){let e=t.length-i,n=0;do{for(let e=i;e>0;e--)t[n+i]+=t[n],n++;e-=i}while(e>0)}function D(t,i,e){let n=0,r=t.length;const s=r/e;for(;r>i;){for(let e=i;e>0;--e)t[n+i]+=t[n],++n;r-=i}const o=t.slice();for(let i=0;i=t.byteLength);++s){let n;if(2===i){switch(r[0]){case 8:n=new Uint8Array(t,s*a*e*o,a*e*o);break;case 16:n=new Uint16Array(t,s*a*e*o,a*e*o/2);break;case 32:n=new Uint32Array(t,s*a*e*o,a*e*o/4);break;default:throw new Error(`Predictor 2 not allowed with ${r[0]} bits per sample.`)}N(n,a)}else 3===i&&(n=new Uint8Array(t,s*a*e*o,a*e*o),D(n,a,o))}return t}(e,n,i?t.TileWidth:t.ImageWidth,i?t.TileLength:t.RowsPerStrip||t.ImageLength,t.BitsPerSample,t.PlanarConfiguration)}return e}}class F extends L{decodeBlock(t){return t}}function z(t,i){for(let e=i.length-1;e>=0;e--)t.push(i[e]);return t}function U(t){const i=new Uint16Array(4093),e=new Uint8Array(4093);for(let t=0;t<=257;t++)i[t]=4096,e[t]=t;let n=258,r=9,s=0;function o(){n=258,r=9}function a(t){const i=function(t,i,e){const n=i%8,r=Math.floor(i/8),s=8-n,o=i+e-8*(r+1);let a=8*(r+2)-(i+e);const u=8*(r+2)-i;if(a=Math.max(0,a),r>=t.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),257;let h=t[r]&2**(8-n)-1;h<<=e-s;let f=h;if(r+1>>a;i<<=Math.max(0,e-u),f+=i}if(o>8&&r+2>>n}return f}(t,s,r);return s+=r,i}function u(t,r){return e[n]=r,i[n]=t,n++,n-1}function h(t){const n=[];for(let r=t;4096!==r;r=i[r])n.push(e[r]);return n}const f=[];o();const c=new Uint8Array(t);let l,d=a(c);for(;257!==d;){if(256===d){for(o(),d=a(c);256===d;)d=a(c);if(257===d)break;if(d>256)throw new Error(`corrupted code at scanline ${d}`);z(f,h(d)),l=d}else if(d=2**r&&(12===r?l=void 0:r++),d=a(c)}return new Uint8Array(f)}class G extends L{decodeBlock(t){return U(t).buffer}}const B=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),q=4017,V=799,Z=3406,$=2276,W=1567,H=3784,K=5793,Y=2896;function X(t,i){let e=0;const n=[];let r=16;for(;r>0&&!t[r-1];)--r;n.push({children:[],index:0});let s,o=n[0];for(let a=0;a0;)o=n.pop();for(o.index++,n.push(o);n.length<=a;)n.push(s={children:[],index:0}),o.children[o.index]=s.children,o=s;e++}a+10)return v--,d>>v&1;if(d=t[l++],255===d){const i=t[l++];if(i)throw new Error(`unexpected marker: ${(d<<8|i).toString(16)}`)}return v=7,d>>>7}function m(t){let i,e=t;for(;null!==(i=p());){if(e=e[i],"number"==typeof e)return e;if("object"!=typeof e)throw new Error("invalid huffman sequence")}return null}function y(t){let i=t,e=0;for(;i>0;){const t=p();if(null===t)return;e=e<<1|t,--i}return e}function g(t){const i=y(t);return i>=1<0)return void b--;let e=s;const n=o;for(;e<=n;){const n=m(t.huffmanTableAC),r=15&n,s=n>>4;if(0===r){if(s<15){b=y(s)+(1<>4,0===e)r<15?(b=y(r)+(1<>4;if(0===n){if(s<15)break;r+=16}else r+=s,i[B[r]]=g(n),r++}};let C,I,R=0;I=1===S?n[0].blocksPerLine*n[0].blocksPerColumn:h*e.mcusPerColumn;const P=r||I;for(;R=65488&&C<=65495))break;l+=2}return l-c}function Q(t,i){const e=[],{blocksPerLine:n,blocksPerColumn:r}=i,s=n<<3,o=new Int32Array(64),a=new Uint8Array(64);function u(t,e,n){const r=i.quantizationTable;let s,o,a,u,h,f,c,l,d;const v=n;let p;for(p=0;p<64;p++)v[p]=t[p]*r[p];for(p=0;p<8;++p){const t=8*p;0!==v[1+t]||0!==v[2+t]||0!==v[3+t]||0!==v[4+t]||0!==v[5+t]||0!==v[6+t]||0!==v[7+t]?(s=K*v[0+t]+128>>8,o=K*v[4+t]+128>>8,a=v[2+t],u=v[6+t],h=Y*(v[1+t]-v[7+t])+128>>8,l=Y*(v[1+t]+v[7+t])+128>>8,f=v[3+t]<<4,c=v[5+t]<<4,d=s-o+1>>1,s=s+o+1>>1,o=d,d=a*H+u*W+128>>8,a=a*W-u*H+128>>8,u=d,d=h-c+1>>1,h=h+c+1>>1,c=d,d=l+f+1>>1,f=l-f+1>>1,l=d,d=s-u+1>>1,s=s+u+1>>1,u=d,d=o-a+1>>1,o=o+a+1>>1,a=d,d=h*$+l*Z+2048>>12,h=h*Z-l*$+2048>>12,l=d,d=f*V+c*q+2048>>12,f=f*q-c*V+2048>>12,c=d,v[0+t]=s+l,v[7+t]=s-l,v[1+t]=o+c,v[6+t]=o-c,v[2+t]=a+f,v[5+t]=a-f,v[3+t]=u+h,v[4+t]=u-h):(d=K*v[0+t]+512>>10,v[0+t]=d,v[1+t]=d,v[2+t]=d,v[3+t]=d,v[4+t]=d,v[5+t]=d,v[6+t]=d,v[7+t]=d)}for(p=0;p<8;++p){const t=p;0!==v[8+t]||0!==v[16+t]||0!==v[24+t]||0!==v[32+t]||0!==v[40+t]||0!==v[48+t]||0!==v[56+t]?(s=K*v[0+t]+2048>>12,o=K*v[32+t]+2048>>12,a=v[16+t],u=v[48+t],h=Y*(v[8+t]-v[56+t])+2048>>12,l=Y*(v[8+t]+v[56+t])+2048>>12,f=v[24+t],c=v[40+t],d=s-o+1>>1,s=s+o+1>>1,o=d,d=a*H+u*W+2048>>12,a=a*W-u*H+2048>>12,u=d,d=h-c+1>>1,h=h+c+1>>1,c=d,d=l+f+1>>1,f=l-f+1>>1,l=d,d=s-u+1>>1,s=s+u+1>>1,u=d,d=o-a+1>>1,o=o+a+1>>1,a=d,d=h*$+l*Z+2048>>12,h=h*Z-l*$+2048>>12,l=d,d=f*V+c*q+2048>>12,f=f*q-c*V+2048>>12,c=d,v[0+t]=s+l,v[56+t]=s-l,v[8+t]=o+c,v[48+t]=o-c,v[16+t]=a+f,v[40+t]=a-f,v[24+t]=u+h,v[32+t]=u-h):(d=K*n[p+0]+8192>>14,v[0+t]=d,v[8+t]=d,v[16+t]=d,v[24+t]=d,v[32+t]=d,v[40+t]=d,v[48+t]=d,v[56+t]=d)}for(p=0;p<64;++p){const t=128+(v[p]+8>>4);e[p]=t<0?0:t>255?255:t}}for(let t=0;t>4==0)for(let e=0;e<64;e++){r[B[e]]=t[i++]}else{if(n>>4!=1)throw new Error("DQT: invalid table spec");for(let t=0;t<64;t++){r[B[t]]=e()}}this.quantizationTables[15&n]=r}break}case 65472:case 65473:case 65474:{e();const n={extended:65473===s,progressive:65474===s,precision:t[i++],scanLines:e(),samplesPerLine:e(),components:{},componentsOrder:[]},o=t[i++];let a;for(let e=0;e>4,r=15&t[i+1],s=t[i+2];n.componentsOrder.push(a),n.components[a]={h:e,v:r,quantizationIdx:s},i+=3}r(n),this.frames.push(n);break}case 65476:{const n=e();for(let e=2;e>4==0?this.huffmanTablesDC[15&n]=X(r,o):this.huffmanTablesAC[15&n]=X(r,o)}break}case 65501:e(),this.resetInterval=e();break;case 65498:{e();const n=t[i++],r=[],s=this.frames[0];for(let e=0;e>4],e.huffmanTableAC=this.huffmanTablesAC[15&n],r.push(e)}const o=t[i++],a=t[i++],u=t[i++],h=J(t,i,s,r,this.resetInterval,o,a,u>>4,15&u);i+=h;break}case 65535:255!==t[i]&&i--;break;default:if(255===t[i-3]&&t[i-2]>=192&&t[i-2]<=254){i-=3;break}throw new Error(`unknown JPEG marker ${s.toString(16)}`)}s=e()}}getResult(){const{frames:t}=this;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(let t=0;t{const a=ut(t,n,r);for(let u=0;u{const a=ut(t,n,r);for(let u=0;u=this.fileDirectory.BitsPerSample.length)throw new RangeError(`Sample index ${t} is out of range.`);return Math.ceil(this.fileDirectory.BitsPerSample[t]/8)}getReaderForSample(t){const i=this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1,e=this.fileDirectory.BitsPerSample[t];switch(i){case 1:if(e<=8)return DataView.prototype.getUint8;if(e<=16)return DataView.prototype.getUint16;if(e<=32)return DataView.prototype.getUint32;break;case 2:if(e<=8)return DataView.prototype.getInt8;if(e<=16)return DataView.prototype.getInt16;if(e<=32)return DataView.prototype.getInt32;break;case 3:switch(e){case 16:return function(t,i){return v(this,t,i)};case 32:return DataView.prototype.getFloat32;case 64:return DataView.prototype.getFloat64}}throw Error("Unsupported data format/bitsPerSample")}getSampleFormat(t=0){return this.fileDirectory.SampleFormat?this.fileDirectory.SampleFormat[t]:1}getBitsPerSample(t=0){return this.fileDirectory.BitsPerSample[t]}getArrayForSample(t,i){return dt(this.getSampleFormat(t),this.getBitsPerSample(t),i)}async getTileOrStrip(t,i,e,n,r){const s=Math.ceil(this.getWidth()/this.getTileWidth()),o=Math.ceil(this.getHeight()/this.getTileHeight());let a;const{tiles:u}=this;let h,f;1===this.planarConfiguration?a=i*s+t:2===this.planarConfiguration&&(a=e*s*o+i*s+t),this.isTiled?(h=this.fileDirectory.TileOffsets[a],f=this.fileDirectory.TileByteCounts[a]):(h=this.fileDirectory.StripOffsets[a],f=this.fileDirectory.StripByteCounts[a]);const c=(await this.source.fetch([{offset:h,length:f}],r))[0];let l;return null!==u&&u[a]?l=u[a]:(l=(async()=>{let t=await n.decode(this.fileDirectory,c);const e=this.getSampleFormat(),r=this.getBitsPerSample();return function(t,i){return(1!==t&&2!==t||!(i<=32)||i%8!=0)&&(3!==t||16!==i&&32!==i&&64!==i)}(e,r)&&(t=function(t,i,e,n,r,s,o){const a=new DataView(t),u=2===e?1:n,h=dt(i,r,2===e?o*s:o*s*n),f=parseInt("1".repeat(r),2);if(1===i){let t;t=1===e?n*r:r;let i=s*t;0!=(7&i)&&(i=i+7&-8);for(let t=0;t>8-r-d&f;else if(d+r<=16)h[c]=a.getUint16(l)>>16-r-d&f;else if(d+r<=24){const t=a.getUint16(l)<<8|a.getUint8(l+2);h[c]=t>>24-r-d&f}else h[c]=a.getUint32(l)>>32-r-d&f}}}}return h.buffer}(t,e,this.planarConfiguration,this.getSamplesPerPixel(),r,this.getTileWidth(),this.getBlockHeight(i))),t})(),null!==u&&(u[a]=l)),{x:t,y:i,sample:e,data:await l}}async _readRaster(t,i,e,n,r,s,o,a,u){const h=this.getTileWidth(),f=this.getTileHeight(),c=Math.max(Math.floor(t[0]/h),0),l=Math.min(Math.ceil(t[2]/h),Math.ceil(this.getWidth()/this.getTileWidth())),d=Math.max(Math.floor(t[1]/f),0),v=Math.min(Math.ceil(t[3]/f),Math.ceil(this.getHeight()/this.getTileHeight())),p=t[2]-t[0];let m=this.getBytesPerPixel();const y=[],g=[];for(let t=0;t{const s=r.data,o=new DataView(s),a=this.getBlockHeight(r.y),u=r.y*f,l=r.x*h,d=u+a,v=(r.x+1)*h,b=g[c],M=Math.min(a,a-(d-t[3])),x=Math.min(h,h-(v-t[2]));for(let r=Math.max(0,t[1]-u);rh[2]||h[1]>h[3])throw new Error("Invalid subsets");const f=(h[2]-h[0])*(h[3]-h[1]),c=this.getSamplesPerPixel();if(i&&i.length){for(let t=0;t=c)return Promise.reject(new RangeError(`Invalid sample index '${i[t]}'.`))}else for(let t=0;tu[2]||u[1]>u[3])throw new Error("Invalid subsets");const h=this.fileDirectory.PhotometricInterpretation;if(h===S){let u=[0,1,2];if(this.fileDirectory.ExtraSamples!==O&&o){u=[];for(let t=0;t>24)/500+a,h=a-(t[i+2]<<24>>24)/200;u=.95047*(u*u*u>.008856?u*u*u:(u-16/116)/7.787),a=1*(a*a*a>.008856?a*a*a:(a-16/116)/7.787),h=1.08883*(h*h*h>.008856?h*h*h:(h-16/116)/7.787),r=3.2406*u+-1.5372*a+-.4986*h,s=-.9689*u+1.8758*a+.0415*h,o=.0557*u+-.204*a+1.057*h,r=r>.0031308?1.055*r**(1/2.4)-.055:12.92*r,s=s>.0031308?1.055*s**(1/2.4)-.055:12.92*s,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,n[e]=255*Math.max(0,Math.min(1,r)),n[e+1]=255*Math.max(0,Math.min(1,s)),n[e+2]=255*Math.max(0,Math.min(1,o))}return n}(d);break;default:throw new Error("Unsupported photometric interpretation.")}if(!i){const t=new Uint8Array(p.length/3),i=new Uint8Array(p.length/3),e=new Uint8Array(p.length/3);for(let n=0,r=0;n"Item"===t.tagName));null!==t&&(s=s.filter((i=>Number(i.attributes.sample)===t)));for(let t=0;t0;let r=!0;for(let s=0;s<8;s++){let o=this._dataView.getUint8(t+(i?s:7-s));n&&(r?0!==o&&(o=255&~(o-1),r=!1):o=255&~o),e+=o*256**s}return n&&(e=-e),e}getUint8(t,i){return this._dataView.getUint8(t,i)}getInt8(t,i){return this._dataView.getInt8(t,i)}getUint16(t,i){return this._dataView.getUint16(t,i)}getInt16(t,i){return this._dataView.getInt16(t,i)}getUint32(t,i){return this._dataView.getUint32(t,i)}getInt32(t,i){return this._dataView.getInt32(t,i)}getFloat16(t,i){return v(this._dataView,t,i)}getFloat32(t,i){return this._dataView.getFloat32(t,i)}getFloat64(t,i){return this._dataView.getFloat64(t,i)}}class mt{constructor(t,i,e,n){this._dataView=new DataView(t),this._sliceOffset=i,this._littleEndian=e,this._bigTiff=n}get sliceOffset(){return this._sliceOffset}get sliceTop(){return this._sliceOffset+this.buffer.byteLength}get littleEndian(){return this._littleEndian}get bigTiff(){return this._bigTiff}get buffer(){return this._dataView.buffer}covers(t,i){return this.sliceOffset<=t&&this.sliceTop>=t+i}readUint8(t){return this._dataView.getUint8(t-this._sliceOffset,this._littleEndian)}readInt8(t){return this._dataView.getInt8(t-this._sliceOffset,this._littleEndian)}readUint16(t){return this._dataView.getUint16(t-this._sliceOffset,this._littleEndian)}readInt16(t){return this._dataView.getInt16(t-this._sliceOffset,this._littleEndian)}readUint32(t){return this._dataView.getUint32(t-this._sliceOffset,this._littleEndian)}readInt32(t){return this._dataView.getInt32(t-this._sliceOffset,this._littleEndian)}readFloat32(t){return this._dataView.getFloat32(t-this._sliceOffset,this._littleEndian)}readFloat64(t){return this._dataView.getFloat64(t-this._sliceOffset,this._littleEndian)}readUint64(t){const i=this.readUint32(t),e=this.readUint32(t+4);let n;if(this._littleEndian){if(n=i+2**32*e,!Number.isSafeInteger(n))throw new Error(`${n} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return n}if(n=2**32*i+e,!Number.isSafeInteger(n))throw new Error(`${n} exceeds MAX_SAFE_INTEGER. Precision may be lost. Please report if you get this message to https://github.com/geotiffjs/geotiff.js/issues`);return n}readInt64(t){let i=0;const e=(128&this._dataView.getUint8(t+(this._littleEndian?7:0)))>0;let n=!0;for(let r=0;r<8;r++){let s=this._dataView.getUint8(t+(this._littleEndian?r:7-r));e&&(n?0!==s&&(s=255&~(s-1),n=!1):s=255&~s),i+=s*256**r}return e&&(i=-i),i}readOffset(t){return this._bigTiff?this.readUint64(t):this.readUint32(t)}}var yt=e(81407);yt.registerSerializer;const gt=yt.spawn,bt=(yt.DefaultSerializer,yt.Pool),wt=(yt.Thread,yt.Transfer),Mt=yt.Worker,xt="undefined"!=typeof navigator?navigator.hardwareConcurrency:null;var kt=class{constructor(t=xt,i=new Mt("./decoder.worker.js")){this.pool=bt((()=>gt(i)),t)}async decode(t,i){return new Promise(((e,n)=>{this.pool.queue((async r=>{try{const n=await r(t,wt(i));e(n)}catch(t){n(t)}}))}))}destroy(){this.pool.terminate(!0)}};const St="\r\n\r\n";function Et(t){if(void 0!==Object.fromEntries)return Object.fromEntries(t);const i={};for(const[e,n]of t)i[e.toLowerCase()]=n;return i}function Tt(t){return Et(t.split("\r\n").map((t=>{const i=t.split(":").map((t=>t.trim()));return i[0]=i[0].toLowerCase(),i})))}function _t(t){let i,e,n;return t&&([,i,e,n]=t.match(/bytes (\d+)-(\d+)\/(\d+)/),i=parseInt(i,10),e=parseInt(e,10),n=parseInt(n,10)),{start:i,end:e,total:n}}class At{async fetch(t,i){return await Promise.all(t.map((t=>this.fetchSlice(t,i))))}async fetchSlice(t){throw new Error(`fetching of slice ${t} not possible, not implemented`)}get fileSize(){return null}async close(){}}var Ot=e(35295),jt=e.n(Ot);function Ct(t,i){for(const e in i)i.hasOwnProperty(e)&&(t[e]=i[e])}function It(t){const i={};for(const e in t)if(t.hasOwnProperty(e)){i[t[e]]=e}return i}function Rt(t,i){const e=[];for(let n=0;n[t,n[i]]))}class Nt extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,Nt),this.name="AbortError"}}class Dt extends Error{constructor(t,i){super(i),this.errors=t,this.message=i,this.name="AggregateError"}}const Lt=Dt;class Ft{constructor(t,i,e=null){this.offset=t,this.length=i,this.data=e}get top(){return this.offset+this.length}}class zt{constructor(t,i,e){this.offset=t,this.length=i,this.blockIds=e}}class Ut extends At{constructor(t,{blockSize:i=65536,cacheSize:e=100}={}){super(),this.source=t,this.blockSize=i,this.blockCache=new(jt())({max:e}),this.blockRequests=new Map,this.blockIdsToFetch=new Set}get fileSize(){return this.source.fileSize}async fetch(t,i){const e=new Map,n=new Map,r=new Set;for(const{offset:i,length:s}of t){let t=i+s;const{fileSize:o}=this;null!==o&&(t=Math.min(t,o));for(let s=Math.floor(i/this.blockSize)*this.blockSize;ssetTimeout(i,t)))}(),this.fetchBlocks(i);for(const t of r){const i=this.blockRequests.get(t),r=this.blockCache.get(t);if(i)n.set(t,i);else{if(!r)throw new Error(`Block ${t} is not in the block requests`);e.set(t,r)}}let s=await Promise.allSettled(n.values());if(s.some((t=>"rejected"===t.status))){const t=new Set;for(const[e,r]of Pt(n.keys(),s)){const{rejected:n,reason:s}=r;n&&"AbortError"===s.name&&s.signal!==i&&(this.blockIdsToFetch.add(e),t.add(e))}if(this.blockIdsToFetch.length>0){this.fetchBlocks(i);for(const i of t){const t=this.blockRequests.get(i);if(!t)throw new Error(`Block ${i} is not in the block requests`);n.set(i,t)}s=await Promise.allSettled(Array.from(n.values()))}}if(s.some((t=>"rejected"===t.status))){if(i&&i.aborted)throw new Nt("Request was aborted");throw new Lt(s.filter((t=>"rejected"===t.status)).map((t=>t.reason)),"Request failed")}const o=s.map((t=>t.value)),a=new Map(Pt(Array.from(n.keys()),o));for(const[t,i]of e)a.set(t,i);return this.readSliceData(t,a)}fetchBlocks(t){if(this.blockIdsToFetch.size>0){const i=this.groupBlocks(this.blockIdsToFetch),e=this.source.fetch(i,t);for(let n=0;n{try{const t=(await e)[n],r=i*this.blockSize,s=r-t.offset,o=Math.min(s+this.blockSize,t.data.byteLength),a=t.data.slice(s,o),u=new Ft(r,a.byteLength,a);return this.blockCache.set(i,u),u}catch(i){throw"AbortError"===i.name&&(i.signal=t),i}finally{this.blockRequests.delete(i)}})();this.blockRequests.set(i,r)}}this.blockIdsToFetch.clear()}}groupBlocks(t){const i=Array.from(t).sort(((t,i)=>t-i));if(0===i.length)return[];let e=[],n=null;const r=[];for(const t of i)null===n||n+1===t?(e.push(t),n=t):(r.push(new zt(e[0]*this.blockSize,e.length*this.blockSize,e)),e=[t],n=t);return r.push(new zt(e[0]*this.blockSize,e.length*this.blockSize,e)),r}readSliceData(t,i){return t.map((t=>{const e=t.offset+t.length,n=Math.floor(t.offset/this.blockSize),r=Math.floor((t.offset+t.length)/this.blockSize),s=new ArrayBuffer(t.length),o=new Uint8Array(s);for(let s=n;s<=r;++s){const n=i.get(s),r=n.offset-t.offset,a=n.top-e;let u,h=0,f=0;r<0?h=-r:r>0&&(f=r),u=a<0?n.length-h:e-n.offset-h;const c=new Uint8Array(n.data,h,u);o.set(c,f)}return s}))}}class Gt{get ok(){return this.status>=200&&this.status<=299}get status(){throw new Error("not implemented")}getHeader(t){throw new Error("not implemented")}async getData(){throw new Error("not implemented")}}class Bt{constructor(t){this.url=t}async request({headers:t,credentials:i,signal:e}={}){throw new Error("request is not implemented")}}class qt extends Gt{constructor(t){super(),this.response=t}get status(){return this.response.status}getHeader(t){return this.response.headers.get(t)}async getData(){return this.response.arrayBuffer?await this.response.arrayBuffer():(await this.response.buffer()).buffer}}class Vt extends Bt{constructor(t,i){super(t),this.credentials=i}async request({headers:t,credentials:i,signal:e}={}){const n=await fetch(this.url,{headers:t,credentials:i,signal:e});return new qt(n)}}class Zt extends Gt{constructor(t,i){super(),this.xhr=t,this.data=i}get status(){return this.xhr.status}getHeader(t){return this.xhr.getResponseHeader(t)}async getData(){return this.data}}class $t extends Bt{constructRequest(t,i){return new Promise(((e,n)=>{const r=new XMLHttpRequest;r.open("GET",this.url),r.responseType="arraybuffer";for(const[i,e]of Object.entries(t))r.setRequestHeader(i,e);r.onload=()=>{const t=r.response;e(new Zt(r,t))},r.onerror=n,r.onabort=()=>n(new Nt("Request aborted")),r.send(),i&&(i.aborted&&r.abort(),i.addEventListener("abort",(()=>r.abort())))}))}async request({headers:t,signal:i}={}){return await this.constructRequest(t,i)}}var Wt=e(20901),Ht=e.n(Wt),Kt=e(2300),Yt=e.n(Kt),Xt=e(84760);class Jt extends Gt{constructor(t,i){super(),this.response=t,this.dataPromise=i}get status(){return this.response.statusCode}getHeader(t){return this.response.headers[t]}async getData(){return await this.dataPromise}}class Qt extends Bt{constructor(t){super(t),this.parsedUrl=Xt.parse(this.url),this.httpApi="http:"===this.parsedUrl.protocol?Ht():Yt()}constructRequest(t,i){return new Promise(((e,n)=>{const r=this.httpApi.get({...this.parsedUrl,headers:t},(t=>{const i=new Promise((i=>{const e=[];t.on("data",(t=>{e.push(t)})),t.on("end",(()=>{const t=Buffer.concat(e).buffer;i(t)})),t.on("error",n)}));e(new Jt(t,i))}));r.on("error",n),i&&(i.aborted&&r.destroy(new Nt("Request aborted")),i.addEventListener("abort",(()=>r.destroy(new Nt("Request aborted")))))}))}async request({headers:t,signal:i}={}){return await this.constructRequest(t,i)}}class ti extends At{constructor(t,i,e,n){super(),this.client=t,this.headers=i,this.maxRanges=e,this.allowFullFile=n,this._fileSize=null}async fetch(t,i){return this.maxRanges>=t.length?this.fetchSlices(t,i):(this.maxRanges>0&&t.length,await Promise.all(t.map((t=>this.fetchSlice(t,i)))))}async fetchSlices(t,i){const e=await this.client.request({headers:{...this.headers,Range:`bytes=${t.map((({offset:t,length:i})=>`${t}-${t+i}`)).join(",")}`},signal:i});if(e.ok){if(206===e.status){const{type:n,params:r}=function(t){const[i,...e]=t.split(";").map((t=>t.trim()));return{type:i,params:Et(e.map((t=>t.split("="))))}}(e.getHeader("content-type"));if("multipart/byteranges"===n){const t=function(t,i){let e=null;const n=new TextDecoder("ascii"),r=[],s=`--${i}`,o=`${s}--`;for(let i=0;i<10;++i)n.decode(new Uint8Array(t,i,s.length))===s&&(e=i);if(null===e)throw new Error("Could not find initial boundary");for(;e1){const e=await Promise.all(t.slice(1).map((t=>this.fetchSlice(t,i))));return h.concat(e)}return h}{if(!this.allowFullFile)throw new Error("Server responded with full file");const t=await e.getData();return this._fileSize=t.byteLength,[{data:t,offset:0,length:t.byteLength}]}}throw new Error("Error fetching data.")}async fetchSlice(t,i){const{offset:e,length:n}=t,r=await this.client.request({headers:{...this.headers,Range:`bytes=${e}-${e+n}`},signal:i});if(r.ok){if(206===r.status){const t=await r.getData(),{total:i}=_t(r.getHeader("content-range"));return this._fileSize=i||null,{data:t,offset:e,length:n}}{if(!this.allowFullFile)throw new Error("Server responded with full file");const t=await r.getData();return this._fileSize=t.byteLength,{data:t,offset:0,length:t.byteLength}}}throw new Error("Error fetching data.")}get fileSize(){return this._fileSize}}function ii(t,{blockSize:i,cacheSize:e}){return null===i?t:new Ut(t,i,e)}function ei(t,{forceXHR:i=!1,...e}={}){return"function"!=typeof fetch||i?"undefined"!=typeof XMLHttpRequest?function(t,{headers:i={},maxRanges:e=0,allowFullFile:n=!1,...r}={}){const s=new $t(t);return ii(new ti(s,i,e,n),r)}(t,e):function(t,{headers:i={},maxRanges:e=0,allowFullFile:n=!1,...r}={}){const s=new Qt(t);return ii(new ti(s,i,e,n),r)}(t,e):function(t,{headers:i={},credentials:e,maxRanges:n=0,allowFullFile:r=!1,...s}={}){const o=new Vt(t,e);return ii(new ti(o,i,n,r),s)}(t,e)}e(77662);const ni=It(y),ri=It(R),si={};Ct(si,ni),Ct(si,ri);It(w);const oi={nextZero:(t,i)=>{let e=i;for(;0!==t[e];)e++;return e},readUshort:(t,i)=>t[i]<<8|t[i+1],readShort:(t,i)=>{const e=oi.ui8;return e[0]=t[i+1],e[1]=t[i+0],oi.i16[0]},readInt:(t,i)=>{const e=oi.ui8;return e[0]=t[i+3],e[1]=t[i+2],e[2]=t[i+1],e[3]=t[i+0],oi.i32[0]},readUint:(t,i)=>{const e=oi.ui8;return e[0]=t[i+3],e[1]=t[i+2],e[2]=t[i+1],e[3]=t[i+0],oi.ui32[0]},readASCII:(t,i,e)=>e.map((e=>String.fromCharCode(t[i+e]))).join(""),readFloat:(t,i)=>{const e=oi.ui8;return Rt(4,(n=>{e[n]=t[i+3-n]})),oi.fl32[0]},readDouble:(t,i)=>{const e=oi.ui8;return Rt(8,(n=>{e[n]=t[i+7-n]})),oi.fl64[0]},writeUshort:(t,i,e)=>{t[i]=e>>8&255,t[i+1]=255&e},writeUint:(t,i,e)=>{t[i]=e>>24&255,t[i+1]=e>>16&255,t[i+2]=e>>8&255,t[i+3]=e>>0&255},writeASCII:(t,i,e)=>{Rt(e.length,(n=>{t[i+n]=e.charCodeAt(n)}))},ui8:new Uint8Array(8)};oi.fl64=new Float64Array(oi.ui8.buffer),oi.writeDouble=(t,i,e)=>{oi.fl64[0]=e,Rt(8,(e=>{t[i+e]=oi.ui8[7-e]}))};class ai{log(){}debug(){}info(){}warn(){}error(){}time(){}timeEnd(){}}new ai;function ui(t){switch(t){case M.BYTE:case M.ASCII:case M.SBYTE:case M.UNDEFINED:return 1;case M.SHORT:case M.SSHORT:return 2;case M.LONG:case M.SLONG:case M.FLOAT:case M.IFD:return 4;case M.RATIONAL:case M.SRATIONAL:case M.DOUBLE:case M.LONG8:case M.SLONG8:case M.IFD8:return 8;default:throw new RangeError(`Invalid field type: ${t}`)}}function hi(t,i,e,n){let r=null,s=null;const o=ui(i);switch(i){case M.BYTE:case M.ASCII:case M.UNDEFINED:r=new Uint8Array(e),s=t.readUint8;break;case M.SBYTE:r=new Int8Array(e),s=t.readInt8;break;case M.SHORT:r=new Uint16Array(e),s=t.readUint16;break;case M.SSHORT:r=new Int16Array(e),s=t.readInt16;break;case M.LONG:case M.IFD:r=new Uint32Array(e),s=t.readUint32;break;case M.SLONG:r=new Int32Array(e),s=t.readInt32;break;case M.LONG8:case M.IFD8:r=new Array(e),s=t.readUint64;break;case M.SLONG8:r=new Array(e),s=t.readInt64;break;case M.RATIONAL:r=new Uint32Array(2*e),s=t.readUint32;break;case M.SRATIONAL:r=new Int32Array(2*e),s=t.readInt32;break;case M.FLOAT:r=new Float32Array(e),s=t.readFloat32;break;case M.DOUBLE:r=new Float64Array(e),s=t.readFloat64;break;default:throw new RangeError(`Invalid field type: ${i}`)}if(i!==M.RATIONAL&&i!==M.SRATIONAL)for(let i=0;it.getWidth()-i.getWidth()));for(let i=0;in||s&&s>o)break}}let c=i;if(o){const[t,i]=a.getOrigin(),[e,n]=u.getResolution(a);c=[Math.round((o[0]-t)/e),Math.round((o[1]-i)/n),Math.round((o[2]-t)/e),Math.round((o[3]-i)/n)],c=[Math.min(c[0],c[2]),Math.min(c[1],c[3]),Math.max(c[0],c[2]),Math.max(c[1],c[3])]}return u.readRasters({...t,window:c})}}class di extends li{constructor(t,i,e,n,r={}){super(),this.source=t,this.littleEndian=i,this.bigTiff=e,this.firstIFDOffset=n,this.cache=r.cache||!1,this.ifdRequests=[],this.ghostValues=null}async getSlice(t,i){const e=this.bigTiff?4048:1024;return new mt((await this.source.fetch([{offset:t,length:void 0!==i?i:e}]))[0],t,this.littleEndian,this.bigTiff)}async parseFileDirectoryAt(t){const i=this.bigTiff?20:12,e=this.bigTiff?8:2;let n=await this.getSlice(t);const r=this.bigTiff?n.readUint64(t):n.readUint16(t),s=r*i+(this.bigTiff?16:6);n.covers(t,s)||(n=await this.getSlice(t,s));const o={};let a=t+(this.bigTiff?8:2);for(let t=0;t{const i=await this.ifdRequests[t-1];if(0===i.nextIFDByteOffset)throw new ci(t);return this.parseFileDirectoryAt(i.nextIFDByteOffset)})(),this.ifdRequests[t]}async getImage(t=0){const i=await this.requestIFD(t);return new vt(i.fileDirectory,i.geoKeyDirectory,this.dataView,this.littleEndian,this.cache,this.source)}async getImageCount(){let t=0,i=!0;for(;i;)try{await this.requestIFD(t),++t}catch(t){if(!(t instanceof ci))throw t;i=!1}return t}async getGhostValues(){const t=this.bigTiff?16:8;if(this.ghostValues)return this.ghostValues;const i="GDAL_STRUCTURAL_METADATA_SIZE=",e=i.length+100;let n=await this.getSlice(t,e);if(i===hi(n,M.ASCII,i.length,t)){const i=hi(n,M.ASCII,e,t).split("\n")[0],r=Number(i.split("=")[1].split(" ")[0])+i.length;r>e&&(n=await this.getSlice(t,r));const s=hi(n,M.ASCII,r,t);this.ghostValues={},s.split("\n").filter((t=>t.length>0)).map((t=>t.split("="))).forEach((([t,i])=>{this.ghostValues[t]=i}))}return this.ghostValues}static async fromSource(t,i,e){const n=(await t.fetch([{offset:0,length:1024}],e))[0],r=new pt(n),s=r.getUint16(0,0);let o;if(18761===s)o=!0;else{if(19789!==s)throw new TypeError("Invalid byte order value.");o=!1}const a=r.getUint16(2,o);let u;if(42===a)u=!1;else{if(43!==a)throw new TypeError("Invalid magic number.");u=!0;if(8!==r.getUint16(4,o))throw new Error("Unsupported offset byte-size.")}const h=u?r.getUint64(8,o):r.getUint32(4,o);return new di(t,o,u,h,i)}close(){return"function"==typeof this.source.close&&this.source.close()}}class vi extends li{constructor(t,i){super(),this.mainFile=t,this.overviewFiles=i,this.imageFiles=[t].concat(i),this.fileDirectoriesPerFile=null,this.fileDirectoriesPerFileParsing=null,this.imageCount=null}async parseFileDirectoriesPerFile(){const t=[this.mainFile.parseFileDirectoryAt(this.mainFile.firstIFDOffset)].concat(this.overviewFiles.map((t=>t.parseFileDirectoryAt(t.firstIFDOffset))));return this.fileDirectoriesPerFile=await Promise.all(t),this.fileDirectoriesPerFile}async getImage(t=0){await this.getImageCount(),await this.parseFileDirectoriesPerFile();let i=0,e=0;for(let n=0;nt.getImageCount())));return this.imageCounts=await Promise.all(t),this.imageCount=this.imageCounts.reduce(((t,i)=>t+i),0),this.imageCount}}var pi=e(62896),mi=new Blob(['function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function asyncGeneratorStep(e,t,r,n,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){asyncGeneratorStep(i,n,a,o,s,"next",e)}function s(e){asyncGeneratorStep(i,n,a,o,s,"throw",e)}o(void 0)}))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),f=n.call(o,"finallyLoc");if(l&&f){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),D(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;D(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:A(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),p}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"===("undefined"==typeof globalThis?"undefined":_typeof(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(runtime);var worker={},isObservable=function(e){return!!e&&("symbol"===_typeof(Symbol.observable)&&"function"==typeof e[Symbol.observable]?e===e[Symbol.observable]():"function"==typeof e["@@observable"]&&e===e["@@observable"]())},common$1={},serializers={};function extendSerializer(e,t){var r=e.deserialize.bind(e),n=e.serialize.bind(e);return{deserialize:function(e){return t.deserialize(e,r)},serialize:function(e){return t.serialize(e,n)}}}Object.defineProperty(serializers,"__esModule",{value:!0}),serializers.DefaultSerializer=serializers.extendSerializer=void 0,serializers.extendSerializer=extendSerializer;var DefaultErrorSerializer={deserialize:function(e){return Object.assign(Error(e.message),{name:e.name,stack:e.stack})},serialize:function(e){return{__error_marker:"$$error",message:e.message,name:e.name,stack:e.stack}}},isSerializedError=function(e){return e&&"object"===_typeof(e)&&"__error_marker"in e&&"$$error"===e.__error_marker};serializers.DefaultSerializer={deserialize:function(e){return isSerializedError(e)?DefaultErrorSerializer.deserialize(e):e},serialize:function(e){return e instanceof Error?DefaultErrorSerializer.serialize(e):e}},Object.defineProperty(common$1,"__esModule",{value:!0}),common$1.serialize=common$1.deserialize=common$1.registerSerializer=void 0;var serializers_1=serializers,registeredSerializer=serializers_1.DefaultSerializer;function registerSerializer(e){registeredSerializer=serializers_1.extendSerializer(registeredSerializer,e)}function deserialize(e){return registeredSerializer.deserialize(e)}function serialize(e){return registeredSerializer.serialize(e)}common$1.registerSerializer=registerSerializer,common$1.deserialize=deserialize,common$1.serialize=serialize;var transferable={},symbols={};Object.defineProperty(symbols,"__esModule",{value:!0}),symbols.$worker=symbols.$transferable=symbols.$terminate=symbols.$events=symbols.$errors=void 0,symbols.$errors=Symbol("thread.errors"),symbols.$events=Symbol("thread.events"),symbols.$terminate=Symbol("thread.terminate"),symbols.$transferable=Symbol("thread.transferable"),symbols.$worker=Symbol("thread.worker"),Object.defineProperty(transferable,"__esModule",{value:!0}),transferable.Transfer=transferable.isTransferDescriptor=void 0;var symbols_1=symbols;function isTransferable(e){return!(!e||"object"!==_typeof(e))}function isTransferDescriptor(e){return e&&"object"===_typeof(e)&&e[symbols_1.$transferable]}function Transfer$1(e,t){var r;if(!t){if(!isTransferable(e))throw Error();t=[e]}return _defineProperty(r={},symbols_1.$transferable,!0),_defineProperty(r,"send",e),_defineProperty(r,"transferables",t),r}transferable.isTransferDescriptor=isTransferDescriptor,transferable.Transfer=Transfer$1;var messages$1={},exports,MasterMessageType,WorkerMessageType;exports=messages$1,Object.defineProperty(exports,"__esModule",{value:!0}),exports.WorkerMessageType=exports.MasterMessageType=void 0,(MasterMessageType=exports.MasterMessageType||(exports.MasterMessageType={})).cancel="cancel",MasterMessageType.run="run",(WorkerMessageType=exports.WorkerMessageType||(exports.WorkerMessageType={})).error="error",WorkerMessageType.init="init",WorkerMessageType.result="result",WorkerMessageType.running="running",WorkerMessageType.uncaughtError="uncaughtError";var implementation$1={},implementation_browser={};Object.defineProperty(implementation_browser,"__esModule",{value:!0});var isWorkerRuntime$2=function(){var e="undefined"!=typeof self&&"undefined"!=typeof Window&&self instanceof Window;return!("undefined"==typeof self||!self.postMessage||e)},postMessageToMaster$2=function(e,t){self.postMessage(e,t)},subscribeToMasterMessages$2=function(e){var t=function(t){e(t.data)};return self.addEventListener("message",t),function(){self.removeEventListener("message",t)}};implementation_browser.default={isWorkerRuntime:isWorkerRuntime$2,postMessageToMaster:postMessageToMaster$2,subscribeToMasterMessages:subscribeToMasterMessages$2};var implementation_tinyWorker={};Object.defineProperty(implementation_tinyWorker,"__esModule",{value:!0}),"undefined"==typeof self&&(commonjsGlobal.self=commonjsGlobal);var isWorkerRuntime$1=function(){return!("undefined"==typeof self||!self.postMessage)},postMessageToMaster$1=function(e){self.postMessage(e)},muxingHandlerSetUp=!1,messageHandlers=new Set,subscribeToMasterMessages$1=function(e){muxingHandlerSetUp||(self.addEventListener("message",(function(e){messageHandlers.forEach((function(t){return t(e.data)}))})),muxingHandlerSetUp=!0),messageHandlers.add(e);return function(){return messageHandlers.delete(e)}};implementation_tinyWorker.default={isWorkerRuntime:isWorkerRuntime$1,postMessageToMaster:postMessageToMaster$1,subscribeToMasterMessages:subscribeToMasterMessages$1};var implementation_worker_threads={},worker_threads={},implementation;function selectImplementation(){return"function"==typeof __non_webpack_require__?__non_webpack_require__("worker_threads"):eval("require")("worker_threads")}function getImplementation(){return implementation||(implementation=selectImplementation()),implementation}Object.defineProperty(worker_threads,"__esModule",{value:!0}),worker_threads.default=getImplementation;var __importDefault$1=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(implementation_worker_threads,"__esModule",{value:!0});var worker_threads_1=__importDefault$1(worker_threads);function assertMessagePort(e){if(!e)throw Error("Invariant violation: MessagePort to parent is not available.");return e}var isWorkerRuntime=function(){return!worker_threads_1.default().isMainThread},postMessageToMaster=function(e,t){assertMessagePort(worker_threads_1.default().parentPort).postMessage(e,t)},subscribeToMasterMessages=function(e){var t=worker_threads_1.default().parentPort;if(!t)throw Error("Invariant violation: MessagePort to parent is not available.");var r=function(t){e(t)};return assertMessagePort(t).on("message",r),function(){assertMessagePort(t).off("message",r)}};function testImplementation(){worker_threads_1.default()}implementation_worker_threads.default={isWorkerRuntime:isWorkerRuntime,postMessageToMaster:postMessageToMaster,subscribeToMasterMessages:subscribeToMasterMessages,testImplementation:testImplementation};var __importDefault=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(implementation$1,"__esModule",{value:!0});var implementation_browser_1=__importDefault(implementation_browser),implementation_tiny_worker_1=__importDefault(implementation_tinyWorker),implementation_worker_threads_1=__importDefault(implementation_worker_threads),runningInNode="undefined"!=typeof process&&"browser"!==process.arch&&"pid"in process;function selectNodeImplementation(){try{return implementation_worker_threads_1.default.testImplementation(),implementation_worker_threads_1.default}catch(e){return implementation_tiny_worker_1.default}}implementation$1.default=runningInNode?selectNodeImplementation():implementation_browser_1.default,function(e){var t=commonjsGlobal&&commonjsGlobal.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(a,i){function o(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}l((n=n.apply(e,t||[])).next())}))},r=commonjsGlobal&&commonjsGlobal.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.expose=e.isWorkerRuntime=e.Transfer=e.registerSerializer=void 0;var n=r(isObservable),a=common$1,i=transferable,o=messages$1,s=r(implementation$1),l=common$1;Object.defineProperty(e,"registerSerializer",{enumerable:!0,get:function(){return l.registerSerializer}});var f=transferable;Object.defineProperty(e,"Transfer",{enumerable:!0,get:function(){return f.Transfer}}),e.isWorkerRuntime=s.default.isWorkerRuntime;var u=!1,c=new Map,d=function(e){return e&&e.type===o.MasterMessageType.run},h=function(e){return n.default(e)||function(e){return e&&"object"===_typeof(e)&&"function"==typeof e.subscribe}(e)};function m(e){return i.isTransferDescriptor(e)?{payload:e.send,transferables:e.transferables}:{payload:e,transferables:void 0}}function p(e,t){var r=m(t),n=r.payload,i=r.transferables,l={type:o.WorkerMessageType.error,uid:e,error:a.serialize(n)};s.default.postMessageToMaster(l,i)}function g(e,t,r){var n=m(r),a=n.payload,i=n.transferables,l={type:o.WorkerMessageType.result,uid:e,complete:!!t||void 0,payload:a};s.default.postMessageToMaster(l,i)}function y(e,t){var r={type:o.WorkerMessageType.running,uid:e,resultType:t};s.default.postMessageToMaster(r)}function b(e){try{var t={type:o.WorkerMessageType.uncaughtError,error:a.serialize(e)};s.default.postMessageToMaster(t)}catch(t){console.error("Not reporting uncaught error back to master thread as it occured while reporting an uncaught error already.\\nLatest error:",t,"\\nOriginal error:",e)}}function v(e,r,n){return t(this,void 0,void 0,regeneratorRuntime.mark((function t(){var i,o,s,l;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,i=r.apply(void 0,_toConsumableArray(n)),t.next=7;break;case 4:return t.prev=4,t.t0=t.catch(0),t.abrupt("return",p(e,t.t0));case 7:if(o=h(i)?"observable":"promise",y(e,o),!h(i)){t.next=14;break}s=i.subscribe((function(t){return g(e,!1,a.serialize(t))}),(function(t){p(e,a.serialize(t)),c.delete(e)}),(function(){g(e,!0),c.delete(e)})),c.set(e,s),t.next=24;break;case 14:return t.prev=14,t.next=17,i;case 17:l=t.sent,g(e,!0,a.serialize(l)),t.next=24;break;case 21:t.prev=21,t.t1=t.catch(14),p(e,a.serialize(t.t1));case 24:case"end":return t.stop()}}),t,null,[[0,4],[14,21]])})))}e.expose=function(e){if(!s.default.isWorkerRuntime())throw Error("expose() called in the master thread.");if(u)throw Error("expose() called more than once. This is not possible. Pass an object to expose() if you want to expose multiple functions.");if(u=!0,"function"==typeof e)s.default.subscribeToMasterMessages((function(t){d(t)&&!t.method&&v(t.uid,e,t.args.map(a.deserialize))})),t={type:o.WorkerMessageType.init,exposed:{type:"function"}},s.default.postMessageToMaster(t);else{if("object"!==_typeof(e)||!e)throw Error("Invalid argument passed to expose(). Expected a function or an object, got: ".concat(e));s.default.subscribeToMasterMessages((function(t){d(t)&&t.method&&v(t.uid,e[t.method],t.args.map(a.deserialize))})),function(e){var t={type:o.WorkerMessageType.init,exposed:{type:"module",methods:e}};s.default.postMessageToMaster(t)}(Object.keys(e).filter((function(t){return"function"==typeof e[t]})))}var t;s.default.subscribeToMasterMessages((function(e){if((n=e)&&n.type===o.MasterMessageType.cancel){var t=e.uid,r=c.get(t);r&&(r.unsubscribe(),c.delete(t))}var n}))},"undefined"!=typeof self&&"function"==typeof self.addEventListener&&s.default.isWorkerRuntime()&&(self.addEventListener("error",(function(e){setTimeout((function(){return b(e.error||e)}),250)})),self.addEventListener("unhandledrejection",(function(e){var t=e.reason;t&&"string"==typeof t.message&&setTimeout((function(){return b(t)}),250)}))),"undefined"!=typeof process&&"function"==typeof process.on&&s.default.isWorkerRuntime()&&(process.on("uncaughtException",(function(e){setTimeout((function(){return b(e)}),250)})),process.on("unhandledRejection",(function(e){e&&"string"==typeof e.message&&setTimeout((function(){return b(e)}),250)})))}(worker);var WorkerContext=getDefaultExportFromCjs(worker),expose=WorkerContext.expose;WorkerContext.registerSerializer;var Transfer=WorkerContext.Transfer;function decodeRowAcc(e,t){var r=e.length-t,n=0;do{for(var a=t;a>0;a--)e[n+t]+=e[n],n++;r-=t}while(r>0)}function decodeRowFloatingPoint(e,t,r){for(var n=0,a=e.length,i=a/r;a>t;){for(var o=t;o>0;--o)e[n+t]+=e[n],++n;a-=t}for(var s=e.slice(),l=0;l=e.byteLength);++f){var u=void 0;if(2===t){switch(a[0]){case 8:u=new Uint8Array(e,f*l*r*s,l*r*s);break;case 16:u=new Uint16Array(e,f*l*r*s,l*r*s/2);break;case 32:u=new Uint32Array(e,f*l*r*s,l*r*s/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(a[0]," bits per sample."))}decodeRowAcc(u,l)}else 3===t&&decodeRowFloatingPoint(u=new Uint8Array(e,f*l*r*s,l*r*s),l,s)}return e}var BaseDecoder=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"decode",value:function(){var e=_asyncToGenerator(regeneratorRuntime.mark((function e(t,r){var n,a,i,o,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeBlock(r);case 2:if(n=e.sent,1===(a=t.Predictor||1)){e.next=9;break}return i=!t.StripOffsets,o=i?t.TileWidth:t.ImageWidth,s=i?t.TileLength:t.RowsPerStrip||t.ImageLength,e.abrupt("return",applyPredictor(n,a,o,s,t.BitsPerSample,t.PlanarConfiguration));case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()}]),e}(),RawDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return e}}]),r}(),MIN_BITS=9,CLEAR_CODE=256,EOI_CODE=257,MAX_BYTELENGTH=12;function getByte(e,t,r){var n=t%8,a=Math.floor(t/8),i=8-n,o=t+r-8*(a+1),s=8*(a+2)-(t+r),l=8*(a+2)-t;if(s=Math.max(0,s),a>=e.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),EOI_CODE;var f=e[a]&Math.pow(2,8-n)-1,u=f<<=r-i;if(a+1>>s;u+=c<<=Math.max(0,r-l)}if(o>8&&a+2>>d}return u}function appendReversed(e,t){for(var r=t.length-1;r>=0;r--)e.push(t[r]);return e}function decompress(e){for(var t=new Uint16Array(4093),r=new Uint8Array(4093),n=0;n<=257;n++)t[n]=4096,r[n]=n;var a=258,i=MIN_BITS,o=0;function s(){a=258,i=MIN_BITS}function l(e){var t=getByte(e,o,i);return o+=i,t}function f(e,n){return r[a]=n,t[a]=e,++a-1}function u(e){for(var n=[],a=e;4096!==a;a=t[a])n.push(r[a]);return n}var c=[];s();for(var d,h=new Uint8Array(e),m=l(h);m!==EOI_CODE;){if(m===CLEAR_CODE){for(s(),m=l(h);m===CLEAR_CODE;)m=l(h);if(m===EOI_CODE)break;if(m>CLEAR_CODE)throw new Error("corrupted code at scanline ".concat(m));appendReversed(c,u(m)),d=m}else if(m=Math.pow(2,i)&&(i===MAX_BYTELENGTH?d=void 0:i++),m=l(h)}return new Uint8Array(c)}var LZWDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return decompress(e).buffer}}]),r}(),dctZigZag=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),dctCos1=4017,dctSin1=799,dctCos3=3406,dctSin3=2276,dctCos6=1567,dctSin6=3784,dctSqrt2=5793,dctSqrt1d2=2896;function buildHuffmanTable(e,t){for(var r=0,n=[],a=16;a>0&&!e[a-1];)--a;n.push({children:[],index:0});for(var i,o=n[0],s=0;s0;)o=n.pop();for(o.index++,n.push(o);n.length<=s;)n.push(i={children:[],index:0}),o.children[o.index]=i.children,o=i;r++}s+10)return m--,h>>m&1;if(255===(h=e[d++])){var t=e[d++];if(t)throw new Error("unexpected marker: ".concat((h<<8|t).toString(16)))}return m=7,h>>>7}function g(e){for(var t,r=e;null!==(t=p());){if("number"==typeof(r=r[t]))return r;if("object"!==_typeof(r))throw new Error("invalid huffman sequence")}return null}function y(e){for(var t=e,r=0;t>0;){var n=p();if(null===n)return;r=r<<1|n,--t}return r}function b(e){var t=y(e);return t>=1<0)v--;else for(var r=i,n=o;r<=n;){var a=g(e.huffmanTableAC),s=15&a,f=a>>4;if(0===s){if(f<15){v=y(f)+(1<>4,0===c)a<15?(v=y(a)+(1<>4;if(0===o){if(s<15)break;a+=16}else t[dctZigZag[a+=s]]=b(o),a++}};var P,C,O=0;C=1===I?n[0].blocksPerLine*n[0].blocksPerColumn:f*r.mcusPerColumn;for(var R=a||C;O=65488&&P<=65495))break;d+=2}return d-c}function buildComponentData(e,t){var r=[],n=t.blocksPerLine,a=t.blocksPerColumn,i=n<<3,o=new Int32Array(64),s=new Uint8Array(64);function l(e,r,n){var a,i,o,s,l,f,u,c,d,h,m=t.quantizationTable,p=n;for(h=0;h<64;h++)p[h]=e[h]*m[h];for(h=0;h<8;++h){var g=8*h;0!==p[1+g]||0!==p[2+g]||0!==p[3+g]||0!==p[4+g]||0!==p[5+g]||0!==p[6+g]||0!==p[7+g]?(a=dctSqrt2*p[0+g]+128>>8,i=dctSqrt2*p[4+g]+128>>8,o=p[2+g],s=p[6+g],l=dctSqrt1d2*(p[1+g]-p[7+g])+128>>8,c=dctSqrt1d2*(p[1+g]+p[7+g])+128>>8,f=p[3+g]<<4,u=p[5+g]<<4,d=a-i+1>>1,a=a+i+1>>1,i=d,d=o*dctSin6+s*dctCos6+128>>8,o=o*dctCos6-s*dctSin6+128>>8,s=d,d=l-u+1>>1,l=l+u+1>>1,u=d,d=c+f+1>>1,f=c-f+1>>1,c=d,d=a-s+1>>1,a=a+s+1>>1,s=d,d=i-o+1>>1,i=i+o+1>>1,o=d,d=l*dctSin3+c*dctCos3+2048>>12,l=l*dctCos3-c*dctSin3+2048>>12,c=d,d=f*dctSin1+u*dctCos1+2048>>12,f=f*dctCos1-u*dctSin1+2048>>12,u=d,p[0+g]=a+c,p[7+g]=a-c,p[1+g]=i+u,p[6+g]=i-u,p[2+g]=o+f,p[5+g]=o-f,p[3+g]=s+l,p[4+g]=s-l):(d=dctSqrt2*p[0+g]+512>>10,p[0+g]=d,p[1+g]=d,p[2+g]=d,p[3+g]=d,p[4+g]=d,p[5+g]=d,p[6+g]=d,p[7+g]=d)}for(h=0;h<8;++h){var y=h;0!==p[8+y]||0!==p[16+y]||0!==p[24+y]||0!==p[32+y]||0!==p[40+y]||0!==p[48+y]||0!==p[56+y]?(a=dctSqrt2*p[0+y]+2048>>12,i=dctSqrt2*p[32+y]+2048>>12,o=p[16+y],s=p[48+y],l=dctSqrt1d2*(p[8+y]-p[56+y])+2048>>12,c=dctSqrt1d2*(p[8+y]+p[56+y])+2048>>12,f=p[24+y],u=p[40+y],d=a-i+1>>1,a=a+i+1>>1,i=d,d=o*dctSin6+s*dctCos6+2048>>12,o=o*dctCos6-s*dctSin6+2048>>12,s=d,d=l-u+1>>1,l=l+u+1>>1,u=d,d=c+f+1>>1,f=c-f+1>>1,c=d,d=a-s+1>>1,a=a+s+1>>1,s=d,d=i-o+1>>1,i=i+o+1>>1,o=d,d=l*dctSin3+c*dctCos3+2048>>12,l=l*dctCos3-c*dctSin3+2048>>12,c=d,d=f*dctSin1+u*dctCos1+2048>>12,f=f*dctCos1-u*dctSin1+2048>>12,u=d,p[0+y]=a+c,p[56+y]=a-c,p[8+y]=i+u,p[48+y]=i-u,p[16+y]=o+f,p[40+y]=o-f,p[24+y]=s+l,p[32+y]=s-l):(d=dctSqrt2*n[h+0]+8192>>14,p[0+y]=d,p[8+y]=d,p[16+y]=d,p[24+y]=d,p[32+y]=d,p[40+y]=d,p[48+y]=d,p[56+y]=d)}for(h=0;h<64;++h){var b=128+(p[h]+8>>4);r[h]=b<0?0:b>255?255:b}}for(var f=0;f>4==0)for(var c=0;c<64;c++){u[dctZigZag[c]]=e[t++]}else{if(f>>4!=1)throw new Error("DQT: invalid table spec");for(var d=0;d<64;d++){u[dctZigZag[d]]=r()}}this.quantizationTables[15&f]=u}break;case 65472:case 65473:case 65474:r();for(var h={extended:65473===o,progressive:65474===o,precision:e[t++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},m=e[t++],p=void 0,g=0;g>4,b=15&e[t+1],v=e[t+2];h.componentsOrder.push(p),h.components[p]={h:y,v:b,quantizationIdx:v},t+=3}n(h),this.frames.push(h);break;case 65476:for(var w=r(),_=2;_>4==0?this.huffmanTablesDC[15&k]=buildHuffmanTable(T,E):this.huffmanTablesAC[15&k]=buildHuffmanTable(T,E)}break;case 65501:r(),this.resetInterval=r();break;case 65498:r();for(var M=e[t++],A=[],I=this.frames[0],P=0;P>4],C.huffmanTableAC=this.huffmanTablesAC[15&O],A.push(C)}var R=e[t++],L=e[t++],B=e[t++],U=decodeScan(e,t,I,A,this.resetInterval,R,L,B>>4,15&B);t+=U;break;case 65535:255!==e[t]&&t--;break;default:if(255===e[t-3]&&e[t-2]>=192&&e[t-2]<=254){t-=3;break}throw new Error("unknown JPEG marker ".concat(o.toString(16)))}o=r()}}},{key:"getResult",value:function(){var e=this.frames;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(var t=0;t>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{i=i+(a=a+t[n++]|0)|0}while(--o);a%=65521,i%=65521}return a|i<<16|0}!function(e){var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==_typeof(n))throw new TypeError(n+"must be non-object");for(var a in n)r(n,a)&&(e[a]=n[a])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,a){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),a);else for(var i=0;i>>1:e>>>1;t[r]=e}return t}var crcTable=makeTable();function crc32$1(e,t,r,n){var a=crcTable,i=n+r;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e}var crc32_1=crc32$1,BAD$1=30,TYPE$1=12,inffast=function(e,t){var r,n,a,i,o,s,l,f,u,c,d,h,m,p,g,y,b,v,w,_,k,T,x,S,E;r=e.state,n=e.next_in,S=e.input,a=n+(e.avail_in-5),i=e.next_out,E=e.output,o=i-(t-e.avail_out),s=i+(e.avail_out-257),l=r.dmax,f=r.wsize,u=r.whave,c=r.wnext,d=r.window,h=r.hold,m=r.bits,p=r.lencode,g=r.distcode,y=(1<>>=w=v>>>24,m-=w,0===(w=v>>>16&255))E[i++]=65535&v;else{if(!(16&w)){if(0==(64&w)){v=p[(65535&v)+(h&(1<>>=w,m-=w),m<15&&(h+=S[n++]<>>=w=v>>>24,m-=w,!(16&(w=v>>>16&255))){if(0==(64&w)){v=g[(65535&v)+(h&(1<l){e.msg="invalid distance too far back",r.mode=BAD$1;break e}if(h>>>=w,m-=w,k>(w=i-o)){if((w=k-w)>u&&r.sane){e.msg="invalid distance too far back",r.mode=BAD$1;break e}if(T=0,x=d,0===c){if(T+=f-w,w<_){_-=w;do{E[i++]=d[T++]}while(--w);T=i-k,x=E}}else if(c2;)E[i++]=x[T++],E[i++]=x[T++],E[i++]=x[T++],_-=3;_&&(E[i++]=x[T++],_>1&&(E[i++]=x[T++]))}else{T=i-k;do{E[i++]=E[T++],E[i++]=E[T++],E[i++]=E[T++],_-=3}while(_>2);_&&(E[i++]=E[T++],_>1&&(E[i++]=E[T++]))}break}}break}}while(n>3,h&=(1<<(m-=_<<3))-1,e.next_in=n,e.next_out=i,e.avail_in=n=1&&0===I[_];_--);if(k>_&&(k=_),0===_)return a[i++]=20971520,a[i++]=20971520,s.bits=1,0;for(w=1;w<_&&0===I[w];w++);for(k0&&(e===CODES$1||1!==_))return-1;for(P[1]=0,b=1;bENOUGH_LENS$1||e===DISTS$1&&E>ENOUGH_DISTS$1)return 1;for(;;){m=b-x,o[v]h?(p=C[O+o[v]],g=M[A+o[v]]):(p=96,g=0),l=1<>x)+(f-=l)]=m<<24|p<<16|g|0}while(0!==f);for(l=1<>=1;if(0!==l?(D&=l-1,D+=l):D=0,v++,0==--I[b]){if(b===_)break;b=t[r+o[v]]}if(b>k&&(D&c)!==u){for(0===x&&(x=k),d+=w,S=1<<(T=b-x);T+x<_&&!((S-=I[T+x])<=0);)T++,S<<=1;if(E+=1<ENOUGH_LENS$1||e===DISTS$1&&E>ENOUGH_DISTS$1)return 1;a[u=D&c]=k<<24|T<<16|d-i|0}}return 0!==D&&(a[d+D]=b-x<<24|64<<16|0),s.bits=k,0},utils$2=common,adler32=adler32_1,crc32=crc32_1,inflate_fast=inffast,inflate_table=inftrees,CODES=0,LENS=1,DISTS=2,Z_FINISH=4,Z_BLOCK=5,Z_TREES=6,Z_OK=0,Z_STREAM_END=1,Z_NEED_DICT=2,Z_STREAM_ERROR=-2,Z_DATA_ERROR=-3,Z_MEM_ERROR=-4,Z_BUF_ERROR=-5,Z_DEFLATED=8,HEAD=1,FLAGS=2,TIME=3,OS=4,EXLEN=5,EXTRA=6,NAME=7,COMMENT=8,HCRC=9,DICTID=10,DICT=11,TYPE=12,TYPEDO=13,STORED=14,COPY_=15,COPY=16,TABLE=17,LENLENS=18,CODELENS=19,LEN_=20,LEN=21,LENEXT=22,DIST=23,DISTEXT=24,MATCH=25,LIT=26,CHECK=27,LENGTH=28,DONE=29,BAD=30,MEM=31,SYNC=32,ENOUGH_LENS=852,ENOUGH_DISTS=592,MAX_WBITS=15,DEF_WBITS=MAX_WBITS;function zswap32(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function InflateState(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new utils$2.Buf16(320),this.work=new utils$2.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function inflateResetKeep(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=HEAD,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new utils$2.Buf32(ENOUGH_LENS),t.distcode=t.distdyn=new utils$2.Buf32(ENOUGH_DISTS),t.sane=1,t.back=-1,Z_OK):Z_STREAM_ERROR}function inflateReset(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,inflateResetKeep(e)):Z_STREAM_ERROR}function inflateReset2(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Z_STREAM_ERROR:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,inflateReset(e))):Z_STREAM_ERROR}function inflateInit2(e,t){var r,n;return e?(n=new InflateState,e.state=n,n.window=null,(r=inflateReset2(e,t))!==Z_OK&&(e.state=null),r):Z_STREAM_ERROR}function inflateInit(e){return inflateInit2(e,DEF_WBITS)}var virgin=!0,lenfix,distfix;function fixedtables(e){if(virgin){var t;for(lenfix=new utils$2.Buf32(512),distfix=new utils$2.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(inflate_table(LENS,e.lens,0,288,lenfix,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;inflate_table(DISTS,e.lens,0,32,distfix,0,e.work,{bits:5}),virgin=!1}e.lencode=lenfix,e.lenbits=9,e.distcode=distfix,e.distbits=5}function updatewindow(e,t,r,n){var a,i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(utils$2.arraySet(i.window,t,r-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((a=i.wsize-i.wnext)>n&&(a=n),utils$2.arraySet(i.window,t,r-n,a,i.wnext),(n-=a)?(utils$2.arraySet(i.window,t,r-n,n,0),i.wnext=n,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,r.check=crc32(r.check,D,2,0),f=0,u=0,r.mode=FLAGS;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=BAD;break}if((15&f)!==Z_DEFLATED){e.msg="unknown compression method",r.mode=BAD;break}if(u-=4,k=8+(15&(f>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=BAD;break}r.dmax=1<>8&1),512&r.flags&&(D[0]=255&f,D[1]=f>>>8&255,r.check=crc32(r.check,D,2,0)),f=0,u=0,r.mode=TIME;case TIME:for(;u<32;){if(0===s)break e;s--,f+=n[i++]<>>8&255,D[2]=f>>>16&255,D[3]=f>>>24&255,r.check=crc32(r.check,D,4,0)),f=0,u=0,r.mode=OS;case OS:for(;u<16;){if(0===s)break e;s--,f+=n[i++]<>8),512&r.flags&&(D[0]=255&f,D[1]=f>>>8&255,r.check=crc32(r.check,D,2,0)),f=0,u=0,r.mode=EXLEN;case EXLEN:if(1024&r.flags){for(;u<16;){if(0===s)break e;s--,f+=n[i++]<>>8&255,r.check=crc32(r.check,D,2,0)),f=0,u=0}else r.head&&(r.head.extra=null);r.mode=EXTRA;case EXTRA:if(1024&r.flags&&((h=r.length)>s&&(h=s),h&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),utils$2.arraySet(r.head.extra,n,i,h,k)),512&r.flags&&(r.check=crc32(r.check,n,h,i)),s-=h,i+=h,r.length-=h),r.length))break e;r.length=0,r.mode=NAME;case NAME:if(2048&r.flags){if(0===s)break e;h=0;do{k=n[i+h++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k))}while(k&&h>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=TYPE;break;case DICTID:for(;u<32;){if(0===s)break e;s--,f+=n[i++]<>>=7&u,u-=7&u,r.mode=CHECK;break}for(;u<3;){if(0===s)break e;s--,f+=n[i++]<>>=1)){case 0:r.mode=STORED;break;case 1:if(fixedtables(r),r.mode=LEN_,t===Z_TREES){f>>>=2,u-=2;break e}break;case 2:r.mode=TABLE;break;case 3:e.msg="invalid block type",r.mode=BAD}f>>>=2,u-=2;break;case STORED:for(f>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,f+=n[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=BAD;break}if(r.length=65535&f,f=0,u=0,r.mode=COPY_,t===Z_TREES)break e;case COPY_:r.mode=COPY;case COPY:if(h=r.length){if(h>s&&(h=s),h>l&&(h=l),0===h)break e;utils$2.arraySet(a,n,i,h,o),s-=h,i+=h,l-=h,o+=h,r.length-=h;break}r.mode=TYPE;break;case TABLE:for(;u<14;){if(0===s)break e;s--,f+=n[i++]<>>=5,u-=5,r.ndist=1+(31&f),f>>>=5,u-=5,r.ncode=4+(15&f),f>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=BAD;break}r.have=0,r.mode=LENLENS;case LENLENS:for(;r.have>>=3,u-=3}for(;r.have<19;)r.lens[M[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,x={bits:r.lenbits},T=inflate_table(CODES,r.lens,0,19,r.lencode,0,r.work,x),r.lenbits=x.bits,T){e.msg="invalid code lengths set",r.mode=BAD;break}r.have=0,r.mode=CODELENS;case CODELENS:for(;r.have>>16&255,b=65535&E,!((g=E>>>24)<=u);){if(0===s)break e;s--,f+=n[i++]<>>=g,u-=g,r.lens[r.have++]=b;else{if(16===b){for(S=g+2;u>>=g,u-=g,0===r.have){e.msg="invalid bit length repeat",r.mode=BAD;break}k=r.lens[r.have-1],h=3+(3&f),f>>>=2,u-=2}else if(17===b){for(S=g+3;u>>=g)),f>>>=3,u-=3}else{for(S=g+7;u>>=g)),f>>>=7,u-=7}if(r.have+h>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=BAD;break}for(;h--;)r.lens[r.have++]=k}}if(r.mode===BAD)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=BAD;break}if(r.lenbits=9,x={bits:r.lenbits},T=inflate_table(LENS,r.lens,0,r.nlen,r.lencode,0,r.work,x),r.lenbits=x.bits,T){e.msg="invalid literal/lengths set",r.mode=BAD;break}if(r.distbits=6,r.distcode=r.distdyn,x={bits:r.distbits},T=inflate_table(DISTS,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,x),r.distbits=x.bits,T){e.msg="invalid distances set",r.mode=BAD;break}if(r.mode=LEN_,t===Z_TREES)break e;case LEN_:r.mode=LEN;case LEN:if(s>=6&&l>=258){e.next_out=o,e.avail_out=l,e.next_in=i,e.avail_in=s,r.hold=f,r.bits=u,inflate_fast(e,d),o=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,n=e.input,s=e.avail_in,f=r.hold,u=r.bits,r.mode===TYPE&&(r.back=-1);break}for(r.back=0;y=(E=r.lencode[f&(1<>>16&255,b=65535&E,!((g=E>>>24)<=u);){if(0===s)break e;s--,f+=n[i++]<>v)])>>>16&255,b=65535&E,!(v+(g=E>>>24)<=u);){if(0===s)break e;s--,f+=n[i++]<>>=v,u-=v,r.back+=v}if(f>>>=g,u-=g,r.back+=g,r.length=b,0===y){r.mode=LIT;break}if(32&y){r.back=-1,r.mode=TYPE;break}if(64&y){e.msg="invalid literal/length code",r.mode=BAD;break}r.extra=15&y,r.mode=LENEXT;case LENEXT:if(r.extra){for(S=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=DIST;case DIST:for(;y=(E=r.distcode[f&(1<>>16&255,b=65535&E,!((g=E>>>24)<=u);){if(0===s)break e;s--,f+=n[i++]<>v)])>>>16&255,b=65535&E,!(v+(g=E>>>24)<=u);){if(0===s)break e;s--,f+=n[i++]<>>=v,u-=v,r.back+=v}if(f>>>=g,u-=g,r.back+=g,64&y){e.msg="invalid distance code",r.mode=BAD;break}r.offset=b,r.extra=15&y,r.mode=DISTEXT;case DISTEXT:if(r.extra){for(S=r.extra;u>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=BAD;break}r.mode=MATCH;case MATCH:if(0===l)break e;if(h=d-l,r.offset>h){if((h=r.offset-h)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=BAD;break}h>r.wnext?(h-=r.wnext,m=r.wsize-h):m=r.wnext-h,h>r.length&&(h=r.length),p=r.window}else p=a,m=o-r.offset,h=r.length;h>l&&(h=l),l-=h,r.length-=h;do{a[o++]=p[m++]}while(--h);0===r.length&&(r.mode=LEN);break;case LIT:if(0===l)break e;a[o++]=r.length,l--,r.mode=LEN;break;case CHECK:if(r.wrap){for(;u<32;){if(0===s)break e;s--,f|=n[i++]<=252?6:q>=248?5:q>=240?4:q>=224?3:q>=192?2:1;function buf2binstring(e,t){if(t<65534&&(e.subarray&&STR_APPLY_UIA_OK||!e.subarray&&STR_APPLY_OK))return String.fromCharCode.apply(null,utils$1.shrinkBuf(e,t));for(var r="",n=0;n>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},strings$1.buf2binstring=function(e){return buf2binstring(e,e.length)},strings$1.binstring2buf=function(e){for(var t=new utils$1.Buf8(e.length),r=0,n=t.length;r4)s[n++]=65533,r+=i-1;else{for(a&=2===i?31:3===i?15:7;i>1&&r1?s[n++]=65533:a<65536?s[n++]=a:(a-=65536,s[n++]=55296|a>>10&1023,s[n++]=56320|1023&a)}return buf2binstring(s,n)},strings$1.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+_utf8len[e[r]]>t?r:t};var constants={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};function ZStream$1(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var zstream=ZStream$1;function GZheader$1(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var gzheader=GZheader$1,zlib_inflate=inflate$2,utils=common,strings=strings$1,c=constants,msg=messages,ZStream=zstream,GZheader=gzheader,toString=Object.prototype.toString;function Inflate(e){if(!(this instanceof Inflate))return new Inflate(e);this.options=utils.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZStream,this.strm.avail_out=0;var r=zlib_inflate.inflateInit2(this.strm,t.windowBits);if(r!==c.Z_OK)throw new Error(msg[r]);if(this.header=new GZheader,zlib_inflate.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=strings.string2buf(t.dictionary):"[object ArrayBuffer]"===toString.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=zlib_inflate.inflateSetDictionary(this.strm,t.dictionary))!==c.Z_OK))throw new Error(msg[r])}function inflate(e,t){var r=new Inflate(t);if(r.push(e,!0),r.err)throw r.msg||msg[r.err];return r.result}Inflate.prototype.push=function(e,t){var r,n,a,i,o,s=this.strm,l=this.options.chunkSize,f=this.options.dictionary,u=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?c.Z_FINISH:c.Z_NO_FLUSH,"string"==typeof e?s.input=strings.binstring2buf(e):"[object ArrayBuffer]"===toString.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new utils.Buf8(l),s.next_out=0,s.avail_out=l),(r=zlib_inflate.inflate(s,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&f&&(r=zlib_inflate.inflateSetDictionary(this.strm,f)),r===c.Z_BUF_ERROR&&!0===u&&(r=c.Z_OK,u=!1),r!==c.Z_STREAM_END&&r!==c.Z_OK)return this.onEnd(r),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&r!==c.Z_STREAM_END&&(0!==s.avail_in||n!==c.Z_FINISH&&n!==c.Z_SYNC_FLUSH)||("string"===this.options.to?(a=strings.utf8border(s.output,s.next_out),i=s.next_out-a,o=strings.buf2string(s.output,a),s.next_out=i,s.avail_out=l-i,i&&utils.arraySet(s.output,s.output,a,i,0),this.onData(o)):this.onData(utils.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(u=!0)}while((s.avail_in>0||0===s.avail_out)&&r!==c.Z_STREAM_END);return r===c.Z_STREAM_END&&(n=c.Z_FINISH),n===c.Z_FINISH?(r=zlib_inflate.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===c.Z_OK):n!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),s.avail_out=0,!0)},Inflate.prototype.onData=function(e){this.chunks.push(e)},Inflate.prototype.onEnd=function(e){e===c.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=utils.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var inflate_2=inflate,DeflateDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){return inflate_2(new Uint8Array(e)).buffer}}]),r}(),PackbitsDecoder=function(e){_inherits(r,BaseDecoder);var t=_createSuper(r);function r(){return _classCallCheck(this,r),t.apply(this,arguments)}return _createClass(r,[{key:"decodeBlock",value:function(e){for(var t=new DataView(e),r=[],n=0;n>3],E<<=7&D),g=0;g>3]),128&E?(l&&(l[D]=1),p=p>(o=A.encoding<2?T[x++]:S)?o:p,s[D++]=o):(l&&(l[D]=0),s[D++]=n),E<<=1;D+=M}else if(A.encoding<2)for(y=0;y(o=T[x++])?o:p,s[D++]=o;D+=M}else for(p=p>S?S:p,y=0;y0){var o=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(i=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),l=2,f=0;do{if(s>0)for(;s--;)o[f++]=i.getUint8(l++);else{var u=i.getUint8(l++);for(s=-s;s--;)o[f++]=u}s=i.getInt16(l,!0),l+=2}while(l0?1:0),m=d+(n.height%d>0?1:0);n.pixels.blocks=new Array(h*m);for(var p=0,g=0;g3)throw"Invalid block encoding ("+w.encoding+")";if(2!==w.encoding){if(0!==_&&2!==_){if(_>>=6,w.offsetType=_,2===_)w.offset=i.getInt8(1),b++;else if(1===_)w.offset=i.getInt16(1,!0),b+=2;else{if(0!==_)throw"Invalid block offset type";w.offset=i.getFloat32(1,!0),b+=4}if(1===w.encoding)if(_=i.getUint8(b),b++,w.bitsPerPixel=63&_,_>>=6,w.numValidPixelsType=_,2===_)w.numValidPixels=i.getUint8(b),b++;else if(1===_)w.numValidPixels=i.getUint16(b,!0),b+=2;else{if(0!==_)throw"Invalid valid pixel count type";w.numValidPixels=i.getUint32(b,!0),b+=4}}var k;if(t+=b,3!==w.encoding)if(0===w.encoding){var T=(n.pixels.numBytes-1)/4;if(T!==Math.floor(T))throw"uncompressed block has invalid length";k=new ArrayBuffer(4*T),new Uint8Array(k).set(new Uint8Array(e,t,4*T));var x=new Float32Array(k);w.rawData=x,t+=4*T}else if(1===w.encoding){var S=Math.ceil(w.numValidPixels*w.bitsPerPixel/8),E=Math.ceil(S/4);k=new ArrayBuffer(4*E),new Uint8Array(k).set(new Uint8Array(e,t,S)),w.stuffedData=new Uint32Array(k),t+=S}}else t++}return n.eofOffset=t,n},i=function(e,t,r,n,a,i,o){var s,l,f,u=(1<=t)l=f>>>d-t&u,d-=t;else{var p=t-d;l=(f&u)<>>(d=32-p)}i[s]=l=r?(f=u>>>p-r&h,p-=r):(f=(u&h)<<(c=r-p)&h,f+=(u=e[m++])>>>(p=32-c)),t[l]=a[f];else for(d=Math.ceil((s-i)/o),l=0;l=r?(f=u>>>p-r&h,p-=r):(f=(u&h)<<(c=r-p)&h,f+=(u=e[m++])>>>(p=32-c)),t[l]=f=t?(d=o>>>c-t&s,c-=t):(d=(o&s)<<(u=t-c)&s,d+=(o=e[l++])>>>(c=32-u)),h[f]=d=r?(f=u>>>p&d,m-=r,p+=r):(f=u>>>p&d,m=32-(c=r-m),f|=((u=e[h++])&(1<=r?(f=u>>>p&d,m-=r,p+=r):(f=u>>>p&d,m=32-(c=r-m),f|=((u=e[h++])&(1<=t?(d=o>>>h&s,c-=t,h+=t):(d=o>>>h&s,c=32-(u=t-c),d|=((o=e[l++])&(1<=r?(i=o>>>u-r&l,u-=r):(i=(o&l)<<(s=r-u)&l,i+=(o=e[f++])>>>(u=32-s)),t[a]=i;return t},c=function(e,t,r,n){var a,i,o,s,l=(1<=r?(i=o>>>c&l,u-=r,c+=r):(i=o>>>c&l,u=32-(s=r-u),i|=((o=e[f++])&(1<=359?359:a;a-=o;do{t+=e[i++]<<8,r+=t+=e[i++]}while(--o);t=(65535&t)+(t>>>16),r=(65535&r)+(r>>>16)}return 1&n&&(r+=t+=e[i]<<8),((r=(65535&r)+(r>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var r=t.ptr,n=new Uint8Array(e,r,6),a={};if(a.fileIdentifierString=String.fromCharCode.apply(null,n),0!==a.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+a.fileIdentifierString;r+=6;var i,o=new DataView(e,r,8),s=o.getInt32(0,!0);if(a.fileVersion=s,r+=4,s>=3&&(a.checksum=o.getUint32(4,!0),r+=4),o=new DataView(e,r,12),a.height=o.getUint32(0,!0),a.width=o.getUint32(4,!0),r+=8,s>=4?(a.numDims=o.getUint32(8,!0),r+=4):a.numDims=1,o=new DataView(e,r,40),a.numValidPixel=o.getUint32(0,!0),a.microBlockSize=o.getInt32(4,!0),a.blobSize=o.getInt32(8,!0),a.imageType=o.getInt32(12,!0),a.maxZError=o.getFloat64(16,!0),a.zMin=o.getFloat64(24,!0),a.zMax=o.getFloat64(32,!0),r+=40,t.headerInfo=a,t.ptr=r,s>=3&&(i=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,r-i,a.blobSize-14))!==a.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var r=t.headerInfo,n=this.getDataTypeArray(r.imageType),a=r.numDims*this.getDataTypeSize(r.imageType),i=this.readSubArray(e,t.ptr,n,a),o=this.readSubArray(e,t.ptr+a,n,a);t.ptr+=2*a;var s,l=!0;for(s=0;s0){r=new Uint8Array(Math.ceil(o/8));var u=(l=new DataView(e,a,f.numBytes)).getInt16(0,!0),c=2,d=0,h=0;do{if(u>0)for(;u--;)r[d++]=l.getUint8(c++);else for(h=l.getUint8(c++),u=-u;u--;)r[d++]=h;u=l.getInt16(c,!0),c+=2}while(c>3],m<<=7&p):m=r[p>>3],128&m&&(n[p]=1);t.pixels.resultMask=n,f.bitset=r,a+=f.numBytes}return t.ptr=a,t.mask=f,!0},readDataOneSweep:function(e,t,r,n){var a,i=t.ptr,o=t.headerInfo,s=o.numDims,l=o.width*o.height,f=o.imageType,u=o.numValidPixel*d.getDataTypeSize(f)*s,c=t.pixels.resultMask;if(r===Uint8Array)a=new Uint8Array(e,i,u);else{var h=new ArrayBuffer(u);new Uint8Array(h).set(new Uint8Array(e,i,u)),a=new r(h)}if(a.length===l*s)t.pixels.resultPixels=n?d.swapDimensionOrder(a,l,s,r,!0):a;else{t.pixels.resultPixels=new r(l*s);var m=0,p=0,g=0,y=0;if(s>1){if(n){for(p=0;p=o)return!1;var s=new Uint32Array(o-i);d.decodeBits(e,t,s);var l,f,u,c,m=[];for(l=i;l0&&(m[f].second=b<>>32-c,32-w>=c?32===(w+=c)&&(w=0,b=v[++_]):(w+=c-32,b=v[++_],m[f].second|=b>>>32-w));var k=0,T=0,x=new h;for(l=0;l=r?r:k;var S,E,D,M,A,I=[];for(l=i;l0)if(S=[c,f],c<=T)for(E=m[f].second<=0;M--)E>>>M&1?(A.right||(A.right=new h),A=A.right):(A.left||(A.left=new h),A=A.left),0!==M||A.val||(A.val=S[1]);return{decodeLut:I,numBitsLUTQick:T,numBitsLUT:k,tree:x,stuffedData:v,srcPtr:_,bitPos:w}},readHuffman:function(e,t,r,n){var a,i,o,s,l,f,u,c,h,m=t.headerInfo.numDims,p=t.headerInfo.height,g=t.headerInfo.width,y=g*p,b=this.readHuffmanTree(e,t),v=b.decodeLut,w=b.tree,_=b.stuffedData,k=b.srcPtr,T=b.bitPos,x=b.numBitsLUTQick,S=b.numBitsLUT,E=0===t.headerInfo.imageType?128:0,D=t.pixels.resultMask,M=0;T>0&&(k++,T=0);var A,I=_[k],P=1===t.encodeMode,C=new r(y*m),O=C;if(m<2||P){for(A=0;A1&&(O=new r(C.buffer,y*A,y),M=0),t.headerInfo.numValidPixel===g*p)for(c=0,f=0;f>>32-x,32-T>>64-T-x),v[l])i=v[l][1],T+=v[l][0];else for(l=s=I<>>32-S,32-T>>64-T-S),a=w,h=0;h>>S-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=_[++k]),o=i-E,P?(o+=u>0?M:f>0?O[c-g]:M,o&=255,O[c]=o,M=o):O[c]=o}else for(c=0,f=0;f>>32-x,32-T>>64-T-x),v[l])i=v[l][1],T+=v[l][0];else for(l=s=I<>>32-S,32-T>>64-T-S),a=w,h=0;h>>S-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=_[++k]),o=i-E,P?(u>0&&D[c-1]?o+=M:f>0&&D[c-g]?o+=O[c-g]:o+=M,o&=255,O[c]=o,M=o):O[c]=o}}else for(c=0,f=0;f>>32-x,32-T>>64-T-x),v[l])i=v[l][1],T+=v[l][0];else for(l=s=I<>>32-S,32-T>>64-T-S),a=w,h=0;h>>S-h-1&1?a.right:a.left).left&&!a.right){i=a.val,T=T+h+1;break}T>=32&&(T-=32,I=_[++k]),o=i-E,O[c]=o}t.ptr=t.ptr+4*(k+1)+(T>0?4:0),t.pixels.resultPixels=C,m>1&&!n&&(t.pixels.resultPixels=d.swapDimensionOrder(C,y,m,r))},decodeBits:function(e,t,r,n,a){var i=t.headerInfo,d=i.fileVersion,h=0,m=e.byteLength-t.ptr>=5?5:e.byteLength-t.ptr,p=new DataView(e,t.ptr,m),g=p.getUint8(0);h++;var y=g>>6,b=0===y?4:3-y,v=(32&g)>0,w=31&g,_=0;if(1===b)_=p.getUint8(h),h++;else if(2===b)_=p.getUint16(h,!0),h+=2;else{if(4!==b)throw"Invalid valid pixel count type";_=p.getUint32(h,!0),h+=4}var k,T,x,S,E,D,M,A,I,P=2*i.maxZError,C=i.numDims>1?i.maxValues[a]:i.zMax;if(v){for(t.counter.lut++,A=p.getUint8(h),h++,S=Math.ceil((A-1)*w/8),E=Math.ceil(S/4),T=new ArrayBuffer(4*E),x=new Uint8Array(T),t.ptr+=h,x.set(new Uint8Array(e,t.ptr,S)),M=new Uint32Array(T),t.ptr+=S,I=0;A-1>>>I;)I++;S=Math.ceil(_*I/8),E=Math.ceil(S/4),T=new ArrayBuffer(4*E),(x=new Uint8Array(T)).set(new Uint8Array(e,t.ptr,S)),k=new Uint32Array(T),t.ptr+=S,D=d>=3?f(M,w,A-1,n,P,C):s(M,w,A-1,n,P,C),d>=3?l(k,r,I,_,D):o(k,r,I,_,D)}else t.counter.bitstuffer++,I=w,t.ptr+=h,I>0&&(S=Math.ceil(_*I/8),E=Math.ceil(S/4),T=new ArrayBuffer(4*E),(x=new Uint8Array(T)).set(new Uint8Array(e,t.ptr,S)),k=new Uint32Array(T),t.ptr+=S,d>=3?null==n?c(k,r,I,_):l(k,r,I,_,!1,n,P,C):null==n?u(k,r,I,_):o(k,r,I,_,!1,n,P,C))},readTiles:function(e,t,r,n){var a=t.headerInfo,i=a.width,o=a.height,s=i*o,l=a.microBlockSize,f=a.imageType,u=d.getDataTypeSize(f),c=Math.ceil(i/l),h=Math.ceil(o/l);t.pixels.numBlocksY=h,t.pixels.numBlocksX=c,t.pixels.ptr=0;var m,p,g,y,b,v,w,_,k,T,x=0,S=0,E=0,D=0,M=0,A=0,I=0,P=0,C=0,O=0,R=0,L=0,B=0,U=0,N=0,z=new r(l*l),G=o%l||l,Z=i%l||l,$=a.numDims,V=t.pixels.resultMask,F=t.pixels.resultPixels,j=a.fileVersion>=5?14:15,K=a.zMax;for(E=0;E1?(T=F,O=E*i*l+D*l,F=new r(t.pixels.resultPixels.buffer,s*_*u,s),K=a.maxValues[_]):T=null,I=e.byteLength-t.ptr,p={},N=0,P=(m=new DataView(e,t.ptr,Math.min(10,I))).getUint8(0),N++,k=a.fileVersion>=5?4&P:0,C=P>>6&255,(P>>2&j)!=(D*l>>3&j))throw"integrity issue";if(k&&0===_)throw"integrity issue";if((b=3&P)>3)throw t.ptr+=N,"Invalid block encoding ("+b+")";if(2!==b)if(0===b){if(k)throw"integrity issue";if(t.counter.uncompressed++,t.ptr+=N,L=(L=M*A*u)<(B=e.byteLength-t.ptr)?L:B,g=new ArrayBuffer(L%u==0?L:L+u-L%u),new Uint8Array(g).set(new Uint8Array(e,t.ptr,L)),y=new r(g),U=0,V)for(x=0;x1&&!n&&(t.pixels.resultPixels=d.swapDimensionOrder(t.pixels.resultPixels,s,$,r))},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:d.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e,t){var r=e.headerInfo.zMax,n=e.headerInfo.zMin,a=e.headerInfo.maxValues,i=e.headerInfo.numDims,o=e.headerInfo.height*e.headerInfo.width,s=0,l=0,f=0,u=e.pixels.resultMask,c=e.pixels.resultPixels;if(u)if(i>1){if(t)for(s=0;s1&&n!==r)if(t)for(s=0;s=-128&&t<=127;break;case 1:r=t>=0&&t<=255;break;case 2:r=t>=-32768&&t<=32767;break;case 3:r=t>=0&&t<=65536;break;case 4:r=t>=-2147483648&&t<=2147483647;break;case 5:r=t>=0&&t<=4294967296;break;case 6:r=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:r=t>=-17976931348623157e292&&t<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var r=e;switch(e){case 2:case 4:r=e-t;break;case 3:case 5:r=e-2*t;break;case 6:r=0===t?e:1===t?2:1;break;case 7:r=0===t?e:e-2*t+1;break;default:r=e}return r},getOnePixel:function(e,t,r,n){var a=0;switch(r){case 0:a=n.getInt8(t);break;case 1:a=n.getUint8(t);break;case 2:a=n.getInt16(t,!0);break;case 3:a=n.getUint16(t,!0);break;case 4:a=n.getInt32(t,!0);break;case 5:a=n.getUInt32(t,!0);break;case 6:a=n.getFloat32(t,!0);break;case 7:a=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return a},swapDimensionOrder:function(e,t,r,n,a){var i=0,o=0,s=0,l=0,f=e;if(r>1)if(f=new n(t*r),a)for(i=0;i5)throw"unsupported lerc version 2."+o;d.readMask(e,a),i.numValidPixel===i.width*i.height||a.pixels.resultMask||(a.pixels.resultMask=t.maskData);var l=i.width*i.height;a.pixels.resultPixels=new s(l*i.numDims),a.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var f,u=!t.returnPixelInterleavedDims;if(0!==i.numValidPixel)if(i.zMax===i.zMin)d.constructConstantSurface(a,u);else if(o>=4&&d.checkMinMaxRanges(e,a))d.constructConstantSurface(a,u);else{var c=new DataView(e,a.ptr,2),h=c.getUint8(0);if(a.ptr++,h)d.readDataOneSweep(e,a,s,u);else if(o>1&&i.imageType<=1&&Math.abs(i.maxZError-.5)<1e-5){var m=c.getUint8(1);if(a.ptr++,a.encodeMode=m,m>2||o<4&&m>1)throw"Invalid Huffman flag "+m;m?d.readHuffman(e,a,s,u):d.readTiles(e,a,s,u)}else d.readTiles(e,a,s,u)}a.eofOffset=a.ptr,t.inputOffset?(f=a.headerInfo.blobSize+t.inputOffset-a.ptr,Math.abs(f)>=1&&(a.eofOffset=t.inputOffset+a.headerInfo.blobSize)):(f=a.headerInfo.blobSize-a.ptr,Math.abs(f)>=1&&(a.eofOffset=a.headerInfo.blobSize));var p={width:i.width,height:i.height,pixelData:a.pixels.resultPixels,minValue:i.zMin,maxValue:i.zMax,validPixelCount:i.numValidPixel,dimCount:i.numDims,dimStats:{minValues:i.minValues,maxValues:i.maxValues},maskData:a.pixels.resultMask};if(a.pixels.resultMask&&d.isValidPixelValue(i.imageType,r)){var g=a.pixels.resultMask;for(n=0;n1&&(f&&p.push(f),_.fileInfo.mask&&_.fileInfo.mask.numBytes>0&&w++),h++,v.pixels.push(_.pixelData),v.statistics.push({minValue:_.minValue,maxValue:_.maxValue,noDataValue:_.noDataValue,dimStats:_.dimStats})}if(n>1&&w>1){for(d=v.width*v.height,v.bandMasks=p,(f=new Uint8Array(d)).set(p[0]),u=1;udi.fromSource(ei(t,e)))));return new vi(r,s)}(t.url,t.overviews):async function(t,i={},e){return di.fromSource(ei(t,i),e)}(t.url)).then(_i)}function Oi(t,i,e,n){if(Array.isArray(t)){var r=t.length;if(!Array.isArray(i)||r!=i.length)throw new Error(n);for(var s=0;se*t)throw new Error(n)}function ji(t){return t instanceof Int8Array?127:t instanceof Uint8Array||t instanceof Uint8ClampedArray?255:t instanceof Int16Array?32767:t instanceof Uint16Array?65535:t instanceof Int32Array?2147483647:t instanceof Uint32Array?4294967295:t instanceof Float32Array?34e37:255}var Ci=function(t){function i(i){t.call(this,{state:r.Z.LOADING,tileGrid:null,projection:null,opaque:i.opaque,transition:i.transition}),this.lp=i.sources;var e=this.lp.length;this.dp=new Array(e),this.pp=new Array(e),this.mp,this.yp,this.gp=!1,this.At=null,this.bp=i.convertToRGB?"readRGB":"readRasters",this.setKey(this.lp.map((function(t){return t.url})).join(","));for(var n=this,s=new Array(e),o=0;oy.length&&(h=o.length-y.length);var k=o[o.length-1]/y[y.length-1];this.pp[c]=k;var S=y.map((function(t){return t*k})),E="Resolution mismatch for source "+c+", got ["+S+"] but expected ["+o+"]";Oi(o.slice(h,o.length),S,.005,E)}else o=y,this.pp[c]=1;n?Oi(n.slice(h,n.length),m,0,"Tile size mismatch for source "+c):n=m,this.dp[c]=l.reverse()}for(var T=0,_=this.dp.length;T<_;++T)for(var A=this.dp[T];A.length=0;--j){var C=Ti(O[j]);if(C){this.projection=C;break}}this.mp=a,this.yp=u;t:for(var I=0;Id?v=Math.round(f/d):p=Math.round(c/l),v!==e||p!==n){var m=(0,u.E4)(v,p);(0,a.f0)(m,this.getContextOptions());var y=m.canvas;m.drawImage(o,0,0,e,n,0,0,y.width,y.height),this.gt.setImage(y)}}t.prototype.handleImageChange.call(this,i)},i}(r.ZP);i.Z=c},79430:function(t,i,e){"use strict";var n=e(26682),r=e(79021),s=e(96868),o=e(45231),a=e(46987),u=e(92118),h=e(97854),f=e(79309),c=e(28278),l=e(94918),d=e(85409),v=e(62896),p=[101,101],m=function(t){function i(i){var e=i||{};t.call(this,{attributions:e.attributions,imageSmoothing:e.imageSmoothing,projection:e.projection,resolutions:e.resolutions}),this.jt=void 0!==e.crossOrigin?e.crossOrigin:null,this.Np=e.url,this.Mt=void 0!==e.imageLoadFunction?e.imageLoadFunction:s.r6,this.Fp=e.params||{},this.zp=!0,this.Up(),this.Gp=e.serverType,this.np=void 0===e.hidpi||e.hidpi,this.gt=null,this.Lp=[0,0],this.Gd=0,this.Bp=void 0!==e.ratio?e.ratio:1.5}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getFeatureInfoUrl=function(t,i,e,r){if(void 0!==this.Np){var s=(0,v.U2)(e),o=this.getProjection();o&&o!==s&&(i=(0,c.aA)(o,s,t,i),t=(0,v.vs)(t,s,o));var a=(0,d.p8)(t,i,0,p),u={SERVICE:"WMS",VERSION:n.E,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.Fp.LAYERS};(0,f.f0)(u,this.Fp,r);var h=Math.floor((t[0]-a[0])/i),l=Math.floor((a[3]-t[1])/i);return u[this.zp?"I":"X"]=h,u[this.zp?"J":"Y"]=l,this.Vp(a,p,1,o||s,u)}},i.prototype.getLegendUrl=function(t,i){if(void 0!==this.Np){var e={SERVICE:"WMS",VERSION:n.E,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===i||void 0===i.LAYER){var r=this.Fp.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;e.LAYER=r}if(void 0!==t){var s=this.getProjection()?this.getProjection().getMetersPerUnit():1;e.SCALE=t*s/28e-5}return(0,f.f0)(e,i),(0,u.B)(this.Np,e)}},i.prototype.getParams=function(){return this.Fp},i.prototype.getImageInternal=function(t,i,e,s){if(void 0===this.Np)return null;i=this.findNearestResolution(i),1==e||this.np&&void 0!==this.Gp||(e=1);var a=i/e,u=(0,d.qg)(t),h=Math.ceil((0,d.dz)(t)/a),c=Math.ceil((0,d.Cr)(t)/a),l=(0,d.p8)(u,a,0,[h,c]),v=Math.ceil(this.Bp*(0,d.dz)(t)/a),p=Math.ceil(this.Bp*(0,d.Cr)(t)/a),m=(0,d.p8)(u,a,0,[v,p]),y=this.gt;if(y&&this.Gd==this.getRevision()&&y.getResolution()==i&&y.getPixelRatio()==e&&(0,d.r4)(y.getExtent(),l))return y;var g={SERVICE:"WMS",VERSION:n.E,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};(0,f.f0)(g,this.Fp),this.Lp[0]=Math.round((0,d.dz)(m)/a),this.Lp[1]=Math.round((0,d.Cr)(m)/a);var b=this.Vp(m,this.Lp,e,s,g);return this.gt=new o.Z(m,i,e,b,this.jt,this.Mt),this.Gd=this.getRevision(),this.gt.addEventListener(r.Z.CHANGE,this.handleImageChange.bind(this)),this.gt},i.prototype.getImageLoadFunction=function(){return this.Mt},i.prototype.Vp=function(t,i,e,n,r){if((0,h.h)(void 0!==this.Np,9),r[this.zp?"CRS":"SRS"]=n.getCode(),"STYLES"in this.Fp||(r.STYLES=""),1!=e)switch(this.Gp){case a.Z.GEOSERVER:var s=90*e+.5|0;"FORMAT_OPTIONS"in r?r.FORMAT_OPTIONS+=";dpi:"+s:r.FORMAT_OPTIONS="dpi:"+s;break;case a.Z.MAPSERVER:r.MAP_RESOLUTION=90*e;break;case a.Z.CARMENTA_SERVER:case a.Z.QGIS:r.DPI=90*e;break;default:(0,h.h)(!1,8)}r.WIDTH=i[0],r.HEIGHT=i[1];var o,f=n.getAxisOrientation();return o=this.zp&&"ne"==f.substr(0,2)?[t[1],t[0],t[3],t[2]]:t,r.BBOX=o.join(","),(0,u.B)(this.Np,r)},i.prototype.getUrl=function(){return this.Np},i.prototype.setImageLoadFunction=function(t){this.gt=null,this.Mt=t,this.changed()},i.prototype.setUrl=function(t){t!=this.Np&&(this.Np=t,this.gt=null,this.changed())},i.prototype.updateParams=function(t){(0,f.f0)(this.Fp,t),this.Up(),this.gt=null,this.changed()},i.prototype.Up=function(){var t=this.Fp.VERSION||n.E;this.zp=(0,l.n)(t,"1.3")>=0},i}(s.ZP);i.Z=m},77013:function(t,i,e){"use strict";var n=e(23448),r=e(65518),s=e(2778),o=function(t){function i(i){t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,state:n.Z.LOADING,tileLoadFunction:i.tileLoadFunction,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition});var e={url:i.url,projection:this.getProjection(),mediaType:i.mediaType,context:i.context||null};(0,s.X$)(e).then(this.Zp.bind(this)).catch(this.$p.bind(this))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.Zp=function(t){this.tileGrid=t.grid,this.setTileUrlFunction(t.urlFunction,t.urlTemplate),this.setState(n.Z.READY)},i.prototype.$p=function(t){console.error(t),this.setState(n.Z.ERROR)},i}(r.Z);i.Z=o},19987:function(t,i,e){"use strict";e.d(i,{h:function(){return r}});var n=e(93613),r='© OpenStreetMap contributors.',s=function(t){function i(i){var e,n=i||{};e=void 0!==n.attributions?n.attributions:[r];var s=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",o=void 0!==n.url?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";t.call(this,{attributions:e,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:s,imageSmoothing:n.imageSmoothing,maxZoom:void 0!==n.maxZoom?n.maxZoom:19,opaque:void 0===n.opaque||n.opaque,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:o,wrapX:n.wrapX,zDirection:n.zDirection})}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(n.Z);i.Z=s},32670:function(t,i,e){"use strict";var n,r=e(64983),s=e(38048),o=e(79021),a=e(43753),u=e(78412),h=e(96868),f=e(74358),c=e(23448),l=e(86395),d=e(98114),v=e(14643),p=e(79309),m=e(70956),y=e(44812),g=e(85409),b=!0;try{new ImageData(10,10)}catch(t){b=!1}function w(t){var i=!0;try{new ImageData(10,10)}catch(t){i=!1}function e(t,e,n){return i?new ImageData(t,e,n):{data:t,width:e,height:n}}return function(i){var n=i.buffers,r=i.meta,s=i.imageOps,o=i.width,a=i.height,u=n.length,h=n[0].byteLength;if(s){for(var f=new Array(u),c=0;cthis._maxQueueLength;)this._queue.shift().callback(null,null)},i.prototype._dispatch=function(){if(!this._running&&0!==this._queue.length){var t=this._queue.shift();this._job=t;var i=t.inputs[0].width,e=t.inputs[0].height,n=t.inputs.map((function(t){return t.data.buffer})),r=this._workers.length;if(this._running=r,1!==r)for(var s=t.inputs[0].data.length,o=4*Math.ceil(s/4/r),a=0;aStamen Design, under CC BY 3.0.',e(19987).h],s={terrain:{extension:"jpg",opaque:!0},"terrain-background":{extension:"jpg",opaque:!0},"terrain-labels":{extension:"png",opaque:!1},"terrain-lines":{extension:"png",opaque:!1},"toner-background":{extension:"png",opaque:!0},toner:{extension:"png",opaque:!0},"toner-hybrid":{extension:"png",opaque:!1},"toner-labels":{extension:"png",opaque:!1},"toner-lines":{extension:"png",opaque:!1},"toner-lite":{extension:"png",opaque:!0},watercolor:{extension:"jpg",opaque:!0}},o={terrain:{minZoom:0,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:0,maxZoom:18}},a=function(t){function i(i){var e=i.layer.indexOf("-"),n=-1==e?i.layer:i.layer.slice(0,e),a=o[n],u=s[i.layer],h=void 0!==i.url?i.url:"https://stamen-tiles-{a-d}.a.ssl.fastly.net/"+i.layer+"/{z}/{x}/{y}."+u.extension;t.call(this,{attributions:r,cacheSize:i.cacheSize,crossOrigin:"anonymous",imageSmoothing:i.imageSmoothing,maxZoom:null!=i.maxZoom?i.maxZoom:a.maxZoom,minZoom:null!=i.minZoom?i.minZoom:a.minZoom,opaque:u.opaque,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileLoadFunction:i.tileLoadFunction,transition:i.transition,url:h,wrapX:i.wrapX,zDirection:i.zDirection})}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(n.Z);i.Z=a},23448:function(t,i){"use strict";i.Z={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"}},14643:function(t,i,e){"use strict";e.d(i,{s:function(){return v}});var n=e(38048),r=e(74358),s=e(38189),o=e(20380),a=e(77097),u=e(97854),h=e(62896),f=e(10056),c=e(61430),l=e(73926),d=function(t){function i(i){t.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,projection:i.projection,state:i.state,wrapX:i.wrapX}),this.on,this.once,this.un,this.um=void 0!==i.opaque&&i.opaque,this.hm=void 0!==i.tilePixelRatio?i.tilePixelRatio:1,this.tileGrid=void 0!==i.tileGrid?i.tileGrid:null;var e=i.tileGrid;e&&(0,l.Pq)(e.getTileSize(e.getMinZoom()),[256,256]),this.tileCache=new s.Z(i.cacheSize||0),this.tmpSize=[0,0],this.fm=i.key||"",this.tileOptions={transition:i.transition},this.zDirection=i.zDirection?i.zDirection:0}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},i.prototype.expireCache=function(t,i){var e=this.getTileCacheForProjection(t);e&&e.expireCache(i)},i.prototype.forEachLoadedTile=function(t,i,e,n){var r=this.getTileCacheForProjection(t);if(!r)return!1;for(var s,a,u,h=!0,c=e.minX;c<=e.maxX;++c)for(var l=e.minY;l<=e.maxY;++l)a=(0,f.lg)(i,c,l),u=!1,r.containsKey(a)&&(u=(s=r.get(a)).getState()===o.Z.LOADED)&&(u=!1!==n(s)),u||(h=!1);return h},i.prototype.getGutterForProjection=function(t){return 0},i.prototype.getKey=function(){return this.fm},i.prototype.setKey=function(t){this.fm!==t&&(this.fm=t,this.changed())},i.prototype.getOpaque=function(t){return this.um},i.prototype.getResolutions=function(){return this.tileGrid.getResolutions()},i.prototype.getTile=function(t,i,e,n,r){return(0,a.O3)()},i.prototype.getTileGrid=function(){return this.tileGrid},i.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:(0,c.X$)(t)},i.prototype.getTileCacheForProjection=function(t){return(0,u.h)((0,h.OP)(this.getProjection(),t),68),this.tileCache},i.prototype.getTilePixelRatio=function(t){return this.hm},i.prototype.getTilePixelSize=function(t,i,e){var n=this.getTileGridForProjection(e),r=this.getTilePixelRatio(i),s=(0,l.Pq)(n.getTileSize(t),this.tmpSize);return 1==r?s:(0,l.bA)(s,r,this.tmpSize)},i.prototype.getTileCoordForTileUrlFunction=function(t,i){var e=void 0!==i?i:this.getProjection(),n=this.getTileGridForProjection(e);return this.getWrapX()&&e.isGlobal()&&(t=(0,c.Cf)(n,t,e)),(0,f.tE)(t,n)?t:null},i.prototype.clear=function(){this.tileCache.clear()},i.prototype.refresh=function(){this.clear(),t.prototype.refresh.call(this)},i.prototype.updateCacheSize=function(t,i){var e=this.getTileCacheForProjection(i);t>e.highWaterMark&&(e.highWaterMark=t)},i.prototype.useTile=function(t,i,e,n){},i}(r.Z),v=function(t){function i(i,e){t.call(this,i),this.tile=e}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(n.ZP);i.Z=d},85901:function(t,i,e){"use strict";var n=e(93613),r=e(70956),s=e(73926),o=function(t){function i(i){var e=this,n=i||{};t.call(this,{opaque:!1,projection:n.projection,tileGrid:n.tileGrid,wrapX:void 0===n.wrapX||n.wrapX,zDirection:n.zDirection,url:n.template||"z:{z} x:{x} y:{y}",tileLoadFunction:function(t,i){var n=t.getTileCoord()[0],o=(0,s.Pq)(e.tileGrid.getTileSize(n)),a=(0,r.E4)(o[0],o[1]);a.strokeStyle="grey",a.strokeRect(.5,.5,o[0]+.5,o[1]+.5),a.fillStyle="grey",a.strokeStyle="white",a.textAlign="center",a.textBaseline="middle",a.font="24px sans-serif",a.lineWidth=4,a.strokeText(i,o[0]/2,o[1]/2,o[0]),a.fillText(i,o[0]/2,o[1]/2,o[0]),t.setImage(a.canvas)}})}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(n.Z);i.Z=o},10089:function(t,i){"use strict";i.Z={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"}},65518:function(t,i,e){"use strict";e.d(i,{Z:function(){return x}});var n=e(79021),r=e(31634),s=e(69437),o=e(40886),a=e(20380),u=e(42331),h=e(28278),f=e(215),c=e(85409),l=e(19079),d=function(t){function i(i,e,n,r,o,l,d,v,p,m,y,g){t.call(this,o,a.Z.IDLE),this.lm=void 0!==y&&y,this.Ap=g,this.Et=d,this.dm=v,this._t=null,this.vm=e,this.ym=r,this.gm=l||o,this.bm=[],this.wm=null,this.Mm=0;var b=r.getTileCoordExtent(this.gm),w=this.ym.getExtent(),M=this.vm.getExtent(),x=w?(0,c.Ed)(b,w):b;if(0!==(0,c.bg)(x)){var k=i.getExtent();k&&(M=M?(0,c.Ed)(M,k):k);var S=r.getResolution(this.gm[0]),E=(0,h.Co)(i,n,x,S);if(!isFinite(E)||E<=0)this.state=a.Z.EMPTY;else{var T=void 0!==m?m:s.m;if(this.xp=new u.Z(i,n,x,M,E*T,S),0!==this.xp.getTriangles().length){this.Mm=e.getZForResolution(E);var _=this.xp.calculateSourceExtent();if(M&&(i.canWrapX()?(_[1]=(0,f.uZ)(_[1],M[1],M[3]),_[3]=(0,f.uZ)(_[3],M[1],M[3])):_=(0,c.Ed)(_,M)),(0,c.bg)(_)){for(var A=e.getTileRangeForExtentAndZ(_,this.Mm),O=A.minX;O<=A.maxX;O++)for(var j=A.minY;j<=A.maxY;j++){var C=p(this.Mm,O,j,d);C&&this.bm.push(C)}0===this.bm.length&&(this.state=a.Z.EMPTY)}else this.state=a.Z.EMPTY}else this.state=a.Z.EMPTY}}else this.state=a.Z.EMPTY}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getImage=function(){return this._t},i.prototype.Cp=function(){var t=[];if(this.bm.forEach(function(i,e,n){i&&i.getState()==a.Z.LOADED&&t.push({extent:this.vm.getTileCoordExtent(i.tileCoord),image:i.getImage()})}.bind(this)),this.bm.length=0,0===t.length)this.state=a.Z.ERROR;else{var i=this.gm[0],e=this.ym.getTileSize(i),n="number"==typeof e?e:e[0],r="number"==typeof e?e:e[1],s=this.ym.getResolution(i),o=this.vm.getResolution(this.Mm),u=this.ym.getTileCoordExtent(this.gm);this._t=(0,h.sY)(n,r,this.Et,o,this.vm.getExtent(),s,u,this.xp,t,this.dm,this.lm,this.Ap),this.state=a.Z.LOADED}this.changed()},i.prototype.load=function(){if(this.state==a.Z.IDLE){this.state=a.Z.LOADING,this.changed();var t=0;this.wm=[],this.bm.forEach(function(i,e,r){var s=i.getState();if(s==a.Z.IDLE||s==a.Z.LOADING){t++;var o=(0,l.oL)(i,n.Z.CHANGE,(function(e){var n=i.getState();n!=a.Z.LOADED&&n!=a.Z.ERROR&&n!=a.Z.EMPTY||((0,l.bN)(o),0===--t&&(this.xm(),this.Cp()))}),this);this.wm.push(o)}}.bind(this)),0===t?setTimeout(this.Cp.bind(this),0):this.bm.forEach((function(t,i,e){t.getState()==a.Z.IDLE&&t.load()}))}},i.prototype.xm=function(){this.wm.forEach(l.bN),this.wm=null},i}(o.Z),v=e(38189),p=e(66067),m=e(26682),y=e(62896),g=e(10056),b=e(61430),w=e(77097);function M(t,i){t.getImage().src=i}var x=function(t){function i(i){t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,opaque:i.opaque,projection:i.projection,state:i.state,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction?i.tileLoadFunction:M,tilePixelRatio:i.tilePixelRatio,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:i.wrapX,transition:i.transition,key:i.key,attributionsCollapsible:i.attributionsCollapsible,zDirection:i.zDirection}),this.crossOrigin=void 0!==i.crossOrigin?i.crossOrigin:null,this.tileClass=void 0!==i.tileClass?i.tileClass:r.Z,this.tileCacheForProjection={},this.tileGridForProjection={},this.Sm=i.reprojectionErrorThreshold,this.Ap=!1===i.imageSmoothing?m.$:void 0,this.Em=!1}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.canExpireCache=function(){if(!s.j)return t.prototype.canExpireCache.call(this);if(this.tileCache.canExpireCache())return!0;for(var i in this.tileCacheForProjection)if(this.tileCacheForProjection[i].canExpireCache())return!0;return!1},i.prototype.expireCache=function(i,e){if(s.j){var n=this.getTileCacheForProjection(i);for(var r in this.tileCache.expireCache(this.tileCache==n?e:{}),this.tileCacheForProjection){var o=this.tileCacheForProjection[r];o.expireCache(o==n?e:{})}}else t.prototype.expireCache.call(this,i,e)},i.prototype.getContextOptions=function(){return this.Ap},i.prototype.getGutterForProjection=function(t){return s.j&&this.getProjection()&&t&&!(0,y.OP)(this.getProjection(),t)?0:this.getGutter()},i.prototype.getGutter=function(){return 0},i.prototype.getKey=function(){return t.prototype.getKey.call(this)+(this.Ap?"\n"+JSON.stringify(this.Ap):"")},i.prototype.getOpaque=function(i){return!(s.j&&this.getProjection()&&i&&!(0,y.OP)(this.getProjection(),i))&&t.prototype.getOpaque.call(this,i)},i.prototype.getTileGridForProjection=function(i){if(!s.j)return t.prototype.getTileGridForProjection.call(this,i);var e=this.getProjection();if(!this.tileGrid||e&&!(0,y.OP)(e,i)){var n=(0,w.sq)(i);return n in this.tileGridForProjection||(this.tileGridForProjection[n]=(0,b.X$)(i)),this.tileGridForProjection[n]}return this.tileGrid},i.prototype.getTileCacheForProjection=function(i){if(!s.j)return t.prototype.getTileCacheForProjection.call(this,i);var e=this.getProjection();if(!e||(0,y.OP)(e,i))return this.tileCache;var n=(0,w.sq)(i);return n in this.tileCacheForProjection||(this.tileCacheForProjection[n]=new v.Z(this.tileCache.highWaterMark)),this.tileCacheForProjection[n]},i.prototype.Tm=function(t,i,e,r,s,o){var u=[t,i,e],h=this.getTileCoordForTileUrlFunction(u,s),f=h?this.tileUrlFunction(h,r,s):void 0,c=new this.tileClass(u,void 0!==f?a.Z.IDLE:a.Z.EMPTY,void 0!==f?f:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=o,c.addEventListener(n.Z.CHANGE,this.handleTileChange.bind(this)),c},i.prototype.getTile=function(t,i,e,n,r){var o=this.getProjection();if(s.j&&o&&r&&!(0,y.OP)(o,r)){var a,u=this.getTileCacheForProjection(r),h=[t,i,e],f=(0,g.km)(h);u.containsKey(f)&&(a=u.get(f));var c=this.getKey();if(a&&a.key==c)return a;var l=this.getTileGridForProjection(o),v=this.getTileGridForProjection(r),p=this.getTileCoordForTileUrlFunction(h,r),m=new d(o,l,r,v,h,p,this.getTilePixelRatio(n),this.getGutter(),function(t,i,e,n){return this.getTileInternal(t,i,e,n,o)}.bind(this),this.Sm,this.Em,this.Ap);return m.key=c,a?(m.interimTile=a,m.refreshInterimChain(),u.replace(f,m)):u.set(f,m),m}return this.getTileInternal(t,i,e,n,o||r)},i.prototype.getTileInternal=function(t,i,e,n,r){var s=null,o=(0,g.lg)(t,i,e),u=this.getKey();if(this.tileCache.containsKey(o)){if((s=this.tileCache.get(o)).key!=u){var h=s;s=this.Tm(t,i,e,n,r,u),h.getState()==a.Z.IDLE?s.interimTile=h.interimTile:s.interimTile=h,s.refreshInterimChain(),this.tileCache.replace(o,s)}}else s=this.Tm(t,i,e,n,r,u),this.tileCache.set(o,s);return s},i.prototype.setRenderReprojectionEdges=function(t){if(s.j&&this.Em!=t){for(var i in this.Em=t,this.tileCacheForProjection)this.tileCacheForProjection[i].clear();this.changed()}},i.prototype.setTileGridForProjection=function(t,i){if(s.j){var e=(0,y.U2)(t);if(e){var n=(0,w.sq)(e);n in this.tileGridForProjection||(this.tileGridForProjection[n]=i)}}},i}(p.Z)},84775:function(t,i,e){"use strict";var n=e(23448),r=e(65518),s=e(85409),o=e(97854),a=e(27270),u=e(61430),h=e(62896),f=e(36448),c=function(t){function i(i){if(t.call(this,{attributions:i.attributions,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,imageSmoothing:i.imageSmoothing,projection:(0,h.U2)("EPSG:3857"),reprojectionErrorThreshold:i.reprojectionErrorThreshold,state:n.Z.LOADING,tileLoadFunction:i.tileLoadFunction,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:i.zDirection}),this._m=null,this.Am=i.tileSize,i.url)if(i.jsonp)(0,f.R6)(i.url,this.handleTileJSONResponse.bind(this),this.handleTileJSONError.bind(this));else{var e=new XMLHttpRequest;e.addEventListener("load",this.Om.bind(this)),e.addEventListener("error",this.jm.bind(this)),e.open("GET",i.url),e.send()}else i.tileJSON?this.handleTileJSONResponse(i.tileJSON):(0,o.h)(!1,51)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.Om=function(t){var i=t.target;if(!i.status||i.status>=200&&i.status<300){var e;try{e=JSON.parse(i.responseText)}catch(t){return void this.handleTileJSONError()}this.handleTileJSONResponse(e)}else this.handleTileJSONError()},i.prototype.jm=function(t){this.handleTileJSONError()},i.prototype.getTileJSON=function(){return this._m},i.prototype.handleTileJSONResponse=function(t){var i,e=(0,h.U2)("EPSG:4326"),r=this.getProjection();if(void 0!==t.bounds){var o=(0,h.WO)(e,r);i=(0,s.Ne)(t.bounds,o)}var f=(0,u.Tl)(r),c=t.minzoom||0,l=t.maxzoom||22,d=(0,u.dl)({extent:f,maxZoom:l,minZoom:c,tileSize:this.Am});if(this.tileGrid=d,this.tileUrlFunction=(0,a.uR)(t.tiles,d),void 0!==t.attribution&&!this.getAttributions()){var v=void 0!==i?i:f;this.setAttributions((function(i){return(0,s.kK)(v,i.extent)?[t.attribution]:null}))}this._m=t,this.setState(n.Z.READY)},i.prototype.handleTileJSONError=function(){this.setState(n.Z.ERROR)},i}(r.Z);i.Z=c},78068:function(t,i,e){"use strict";var n=e(26682),r=e(65518),s=e(46987),o=e(92118),a=e(97854),u=e(79309),h=e(85409),f=e(73926),c=e(28278),l=e(94918),d=e(62896),v=e(215),p=e(10056),m=function(t){function i(i){var e=i||{},n=e.params||{},r=!("TRANSPARENT"in n)||n.TRANSPARENT;t.call(this,{attributions:e.attributions,attributionsCollapsible:e.attributionsCollapsible,cacheSize:e.cacheSize,crossOrigin:e.crossOrigin,imageSmoothing:e.imageSmoothing,opaque:!r,projection:e.projection,reprojectionErrorThreshold:e.reprojectionErrorThreshold,tileClass:e.tileClass,tileGrid:e.tileGrid,tileLoadFunction:e.tileLoadFunction,url:e.url,urls:e.urls,wrapX:void 0===e.wrapX||e.wrapX,transition:e.transition,zDirection:e.zDirection}),this.dm=void 0!==e.gutter?e.gutter:0,this.Fp=n,this.zp=!0,this.Gp=e.serverType,this.np=void 0===e.hidpi||e.hidpi,this.Cm=(0,h.lJ)(),this.Up(),this.setKey(this.Im())}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getFeatureInfoUrl=function(t,i,e,r){var s=(0,d.U2)(e),o=this.getProjection(),a=this.getTileGrid();a||(a=this.getTileGridForProjection(s));var l=a.getZForResolution(i,this.zDirection),v=a.getTileCoordForCoordAndZ(t,l);if(!(a.getResolutions().length<=v[0])){var p=a.getResolution(v[0]),m=a.getTileCoordExtent(v,this.Cm),y=(0,f.Pq)(a.getTileSize(v[0]),this.tmpSize),g=this.dm;0!==g&&(y=(0,f.f3)(y,g,this.tmpSize),m=(0,h.f3)(m,p*g,m)),o&&o!==s&&(p=(0,c.aA)(o,s,t,p),m=(0,d.$A)(m,s,o),t=(0,d.vs)(t,s,o));var b={SERVICE:"WMS",VERSION:n.E,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.Fp.LAYERS};(0,u.f0)(b,this.Fp,r);var w=Math.floor((t[0]-m[0])/p),M=Math.floor((m[3]-t[1])/p);return b[this.zp?"I":"X"]=w,b[this.zp?"J":"Y"]=M,this.Vp(v,y,m,1,o||s,b)}},i.prototype.getLegendUrl=function(t,i){if(void 0!==this.urls[0]){var e={SERVICE:"WMS",VERSION:n.E,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(void 0===i||void 0===i.LAYER){var r=this.Fp.LAYERS;if(!(!Array.isArray(r)||1===r.length))return;e.LAYER=r}if(void 0!==t){var s=this.getProjection()?this.getProjection().getMetersPerUnit():1;e.SCALE=t*s/28e-5}return(0,u.f0)(e,i),(0,o.B)(this.urls[0],e)}},i.prototype.getGutter=function(){return this.dm},i.prototype.getParams=function(){return this.Fp},i.prototype.Vp=function(t,i,e,n,r,u){var h=this.urls;if(h){if(u.WIDTH=i[0],u.HEIGHT=i[1],u[this.zp?"CRS":"SRS"]=r.getCode(),"STYLES"in this.Fp||(u.STYLES=""),1!=n)switch(this.Gp){case s.Z.GEOSERVER:var f=90*n+.5|0;"FORMAT_OPTIONS"in u?u.FORMAT_OPTIONS+=";dpi:"+f:u.FORMAT_OPTIONS="dpi:"+f;break;case s.Z.MAPSERVER:u.MAP_RESOLUTION=90*n;break;case s.Z.CARMENTA_SERVER:case s.Z.QGIS:u.DPI=90*n;break;default:(0,a.h)(!1,52)}var c,l,d=r.getAxisOrientation(),m=e;if(this.zp&&"ne"==d.substr(0,2))c=e[0],m[0]=e[1],m[1]=c,c=e[2],m[2]=e[3],m[3]=c;if(u.BBOX=m.join(","),1==h.length)l=h[0];else l=h[(0,v.$W)((0,p.vp)(t),h.length)];return(0,o.B)(l,u)}},i.prototype.getTilePixelRatio=function(t){return this.np&&void 0!==this.Gp?t:1},i.prototype.Im=function(){var t=0,i=[];for(var e in this.Fp)i[t++]=e+"-"+this.Fp[e];return i.join("/")},i.prototype.updateParams=function(t){(0,u.f0)(this.Fp,t),this.Up(),this.setKey(this.Im())},i.prototype.Up=function(){var t=this.Fp.VERSION||n.E;this.zp=(0,l.n)(t,"1.3")>=0},i.prototype.tileUrlFunction=function(t,i,e){var r=this.getTileGrid();if(r||(r=this.getTileGridForProjection(e)),!(r.getResolutions().length<=t[0])){1==i||this.np&&void 0!==this.Gp||(i=1);var s=r.getResolution(t[0]),o=r.getTileCoordExtent(t,this.Cm),a=(0,f.Pq)(r.getTileSize(t[0]),this.tmpSize),c=this.dm;0!==c&&(a=(0,f.f3)(a,c,this.tmpSize),o=(0,h.f3)(o,s*c,o)),1!=i&&(a=(0,f.bA)(a,i,this.tmpSize));var l={SERVICE:"WMS",VERSION:n.E,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return(0,u.f0)(l,this.Fp),this.Vp(t,a,o,i,e,l)}},i}(r.Z);i.Z=m},66067:function(t,i,e){"use strict";var n=e(10089),r=e(14643),s=e(20380),o=e(27270),a=e(10056),u=e(77097),h=function(t){function i(e){t.call(this,{attributions:e.attributions,cacheSize:e.cacheSize,opaque:e.opaque,projection:e.projection,state:e.state,tileGrid:e.tileGrid,tilePixelRatio:e.tilePixelRatio,wrapX:e.wrapX,transition:e.transition,key:e.key,attributionsCollapsible:e.attributionsCollapsible,zDirection:e.zDirection}),this.Rm=this.tileUrlFunction===i.prototype.tileUrlFunction,this.tileLoadFunction=e.tileLoadFunction,e.tileUrlFunction&&(this.tileUrlFunction=e.tileUrlFunction),this.urls=null,e.urls?this.setUrls(e.urls):e.url&&this.setUrl(e.url),this.cp={}}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},i.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},i.prototype.getUrls=function(){return this.urls},i.prototype.handleTileChange=function(t){var i,e=t.target,o=(0,u.sq)(e),a=e.getState();a==s.Z.LOADING?(this.cp[o]=!0,i=n.Z.TILELOADSTART):o in this.cp&&(delete this.cp[o],i=a==s.Z.ERROR?n.Z.TILELOADERROR:a==s.Z.LOADED?n.Z.TILELOADEND:void 0),null!=i&&this.dispatchEvent(new r.s(i,e))},i.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},i.prototype.setTileUrlFunction=function(t,i){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),void 0!==i?this.setKey(i):this.changed()},i.prototype.setUrl=function(t){var i=(0,o.Gk)(t);this.urls=i,this.setUrls(i)},i.prototype.setUrls=function(t){this.urls=t;var i=t.join("\n");this.Rm?this.setTileUrlFunction((0,o.uR)(t,this.tileGrid),i):this.setKey(i)},i.prototype.tileUrlFunction=function(t,i,e){},i.prototype.useTile=function(t,i,e){var n=(0,a.lg)(t,i,e);this.tileCache.containsKey(n)&&this.tileCache.get(n)},i}(r.Z);i.Z=h},96802:function(t,i,e){"use strict";var n=e(54009),r=e(93357),s=e(38048),o=e(79021),a=e(36874),u=e(8870),h=e(74358),f=e(23448),c=e(13898),l=e(51287),d=e(1005),v=e(97854),p=e(85409),m=e(95083),y=e(77097),g=e(79309),b=e(19079),w=e(25658),M=function(t){function i(i,e,n){t.call(this,i),this.feature=e,this.features=n}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i}(s.ZP),x=function(t){function i(i){var e=i||{};t.call(this,{attributions:e.attributions,projection:void 0,state:f.Z.READY,wrapX:void 0===e.wrapX||e.wrapX}),this.on,this.once,this.un,this.Tt=l.Zn,this.Pm=e.format,this._l=void 0===e.overlaps||e.overlaps,this.Np=e.url,void 0!==e.loader?this.Tt=e.loader:void 0!==this.Np&&((0,v.h)(this.Pm,7),this.Tt=(0,w.Be)(this.Np,this.Pm)),this.Nm=void 0!==e.strategy?e.strategy:d.$6;var r,s,o=void 0===e.useSpatialIndex||e.useSpatialIndex;this.Dm=o?new u.Z:null,this.Lm=new u.Z,this.Fm=0,this.zm={},this.Um={},this.Gm={},this.Bm={},this.qm=null,Array.isArray(e.features)?s=e.features:e.features&&(s=(r=e.features).getArray()),o||void 0!==r||(r=new n.Z(s)),void 0!==s&&this.addFeaturesInternal(s),void 0!==r&&this.Vm(r)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},i.prototype.addFeatureInternal=function(t){var i=(0,y.sq)(t);if(this.Zm(i,t)){this.$m(i,t);var e=t.getGeometry();if(e){var n=e.getExtent();this.Dm&&this.Dm.insert(n,t)}else this.zm[i]=t;this.dispatchEvent(new M(c.Z.ADDFEATURE,t))}else this.qm&&this.qm.remove(t)},i.prototype.$m=function(t,i){this.Bm[t]=[(0,b.oL)(i,o.Z.CHANGE,this.Ha,this),(0,b.oL)(i,a.Z.PROPERTYCHANGE,this.Ha,this)]},i.prototype.Zm=function(t,i){var e=!0,n=i.getId();return void 0!==n&&(n.toString()in this.Um?e=!1:this.Um[n.toString()]=i),e&&((0,v.h)(!(t in this.Gm),30),this.Gm[t]=i),e},i.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},i.prototype.addFeaturesInternal=function(t){for(var i=[],e=[],n=[],r=0,s=t.length;r0},i.prototype.refresh=function(){this.clear(!0),this.Lm.clear(),t.prototype.refresh.call(this)},i.prototype.removeLoadedExtent=function(t){var i,e=this.Lm;e.forEachInExtent(t,(function(e){if((0,p.fS)(e.extent,t))return i=e,!0})),i&&e.remove(i)},i.prototype.removeFeature=function(t){var i=(0,y.sq)(t);i in this.zm?delete this.zm[i]:this.Dm&&this.Dm.remove(t),this.removeFeatureInternal(t),this.changed()},i.prototype.removeFeatureInternal=function(t){var i=(0,y.sq)(t);this.Bm[i].forEach(b.bN),delete this.Bm[i];var e=t.getId();void 0!==e&&delete this.Um[e.toString()],delete this.Gm[i],this.dispatchEvent(new M(c.Z.REMOVEFEATURE,t))},i.prototype.Hm=function(t){var i=!1;for(var e in this.Um)if(this.Um[e]===t){delete this.Um[e],i=!0;break}return i},i.prototype.setLoader=function(t){this.Tt=t},i.prototype.setUrl=function(t){(0,v.h)(this.Pm,7),this.Np=t,this.setLoader((0,w.Be)(t,this.Pm))},i}(h.Z);i.Z=x},13898:function(t,i){"use strict";i.Z={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"}},49360:function(t,i,e){"use strict";e.d(i,{Z:function(){return b}});var n=e(79021),r=e(40886),s=e(20380),o=function(t){function i(i,e,n,r,s,o){t.call(this,i,e,o),this.extent=null,this.Pm=r,this.ba=null,this.Tt,this.projection=null,this.resolution,this.Ct=s,this.Np=n,this.key=n}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getFormat=function(){return this.Pm},i.prototype.getFeatures=function(){return this.ba},i.prototype.load=function(){this.state==s.Z.IDLE&&(this.setState(s.Z.LOADING),this.Ct(this,this.Np),this.Tt&&this.Tt(this.extent,this.resolution,this.projection))},i.prototype.onLoad=function(t,i){this.setFeatures(t)},i.prototype.onError=function(){this.setState(s.Z.ERROR)},i.prototype.setFeatures=function(t){this.ba=t,this.setState(s.Z.LOADED)},i.prototype.setLoader=function(t){this.Tt=t},i}(r.Z),a=e(38189),u=e(66067),h=e(70956),f=e(77097),c=[],l=function(t){function i(i,e,n,r){t.call(this,i,e,{transition:0}),this.Il={},this.executorGroups={},this.declutterExecutorGroups={},this.loadingSourceTiles=0,this.hitDetectionImageData={},this.Km={},this.sourceTiles=[],this.errorTileKeys={},this.wantedResolution,this.getSourceTiles=r.bind(void 0,this),this.wrappedTileCoord=n}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getContext=function(t){var i=(0,f.sq)(t);return i in this.Il||(this.Il[i]=(0,h.E4)(1,1,c)),this.Il[i]},i.prototype.hasContext=function(t){return(0,f.sq)(t)in this.Il},i.prototype.getImage=function(t){return this.hasContext(t)?this.getContext(t).canvas:null},i.prototype.getReplayState=function(t){var i=(0,f.sq)(t);return i in this.Km||(this.Km[i]={dirty:!1,renderedRenderOrder:null,renderedResolution:NaN,renderedRevision:-1,renderedTileResolution:NaN,renderedTileRevision:-1,renderedTileZ:-1}),this.Km[i]},i.prototype.load=function(){this.getSourceTiles()},i.prototype.release=function(){for(var i in this.Il)c.push(this.Il[i].canvas),delete this.Il[i];t.prototype.release.call(this)},i}(r.Z),d=e(85409),v=e(61430),p=e(10056),m=e(79309),y=e(25658),g=e(73926),b=function(t){function i(i){var e=i.projection||"EPSG:3857",n=i.extent||(0,v.Tl)(e),r=i.tileGrid||(0,v.dl)({extent:n,maxResolution:i.maxResolution,maxZoom:void 0!==i.maxZoom?i.maxZoom:22,minZoom:i.minZoom,tileSize:i.tileSize||512});t.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,opaque:!1,projection:e,state:i.state,tileGrid:r,tileLoadFunction:i.tileLoadFunction?i.tileLoadFunction:w,tileUrlFunction:i.tileUrlFunction,url:i.url,urls:i.urls,wrapX:void 0===i.wrapX||i.wrapX,transition:i.transition,zDirection:void 0===i.zDirection?1:i.zDirection}),this.Pm=i.format?i.format:null,this.sourceTileCache=new a.Z(this.tileCache.highWaterMark),this._l=null==i.overlaps||i.overlaps,this.tileClass=i.tileClass?i.tileClass:o,this.Ym={}}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.getFeaturesInExtent=function(t){var i=[],e=this.tileCache;if(0===e.getCount())return i;var n=(0,p.Ul)(e.peekFirstKey())[0],r=this.tileGrid;return e.forEach((function(e){if(e.tileCoord[0]===n&&e.getState()===s.Z.LOADED)for(var o=e.getSourceTiles(),a=0,u=o.length;a0&&(this.tileUrlFunction=(0,f.Un)(s.map(this.createFromWMTSTemplate.bind(this))))}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.setUrls=function(t){this.urls=t;var i=t.join("\n");this.setTileUrlFunction((0,f.Un)(t.map(this.createFromWMTSTemplate.bind(this))),i)},i.prototype.getDimensions=function(){return this.Jm},i.prototype.getFormat=function(){return this.Pm},i.prototype.getLayer=function(){return this.Nd},i.prototype.getMatrixSet=function(){return this.Qm},i.prototype.getRequestEncoding=function(){return this.ty},i.prototype.getStyle=function(){return this.tt},i.prototype.getVersion=function(){return this.Xm},i.prototype.iy=function(){var t=0,i=[];for(var e in this.Jm)i[t++]=e+"-"+this.Jm[e];return i.join("/")},i.prototype.updateDimensions=function(t){(0,a.f0)(this.Jm,t),this.setKey(this.iy())},i.prototype.createFromWMTSTemplate=function(t){var i=this.ty,e={layer:this.Nd,style:this.tt,tilematrixset:this.Qm};i==r&&(0,a.f0)(e,{Service:"WMTS",Request:"GetTile",Version:this.Xm,Format:this.Pm}),t=i==r?(0,o.B)(t,e):t.replace(/\{(\w+?)\}/g,(function(t,i){return i.toLowerCase()in e?e[i.toLowerCase()]:t}));var n=this.tileGrid,s=this.Jm;return function(e,u,h){if(e){var f={TileMatrix:n.getMatrixId(e[0]),TileCol:e[1],TileRow:e[2]};(0,a.f0)(f,s);var c=t;return c=i==r?(0,o.B)(c,f):c.replace(/\{(\w+?)\}/g,(function(t,i){return f[i]}))}}},i}(n.Z);function v(t,i){var e=t.Contents.Layer,n=(0,l.sE)(e,(function(t,e,n){return t.Identifier==i.layer}));if(null===n)return null;var o,a=t.Contents.TileMatrixSet;(o=n.TileMatrixSetLink.length>1?"projection"in i?(0,l.cx)(n.TileMatrixSetLink,(function(t,e,n){var r=(0,l.sE)(a,(function(i){return i.Identifier==t.TileMatrixSet})).SupportedCRS,s=(0,c.U2)(r),o=(0,c.U2)(i.projection);return s&&o?(0,c.OP)(s,o):r==i.projection})):(0,l.cx)(n.TileMatrixSetLink,(function(t,e,n){return t.TileMatrixSet==i.matrixSet})):0)<0&&(o=0);var f=n.TileMatrixSetLink[o].TileMatrixSet,d=n.TileMatrixSetLink[o].TileMatrixSetLimits,v=n.Format[0];"format"in i&&(v=i.format),(o=(0,l.cx)(n.Style,(function(t,e,n){return"style"in i?t.Title==i.style:t.isDefault})))<0&&(o=0);var p=n.Style[o].Identifier,m={};"Dimension"in n&&n.Dimension.forEach((function(t,i,e){var n=t.Identifier,r=t.Default;void 0===r&&(r=t.Value[0]),m[n]=r}));var y,g=t.Contents.TileMatrixSet,b=(0,l.sE)(g,(function(t,i,e){return t.Identifier==f})),w=b.SupportedCRS;if(w&&(y=(0,c.U2)(w)),"projection"in i){var M=(0,c.U2)(i.projection);M&&(y&&!(0,c.OP)(M,y)||(y=M))}var x=!1,k="ne"==y.getAxisOrientation().substr(0,2),S=b.TileMatrix[0],E={MinTileCol:0,MinTileRow:0,MaxTileCol:S.MatrixWidth-1,MaxTileRow:S.MatrixHeight-1};if(d){E=d[d.length-1];var T=(0,l.sE)(b.TileMatrix,(function(t){return t.Identifier===E.TileMatrix||b.Identifier+":"+t.Identifier===E.TileMatrix}));T&&(S=T)}var _=28e-5*S.ScaleDenominator/y.getMetersPerUnit(),A=k?[S.TopLeftCorner[1],S.TopLeftCorner[0]]:S.TopLeftCorner,O=S.TileWidth*_,j=S.TileHeight*_,C=b.BoundingBox,I=[A[0]+O*E.MinTileCol,A[1]-j*(1+E.MaxTileRow),A[0]+O*(1+E.MaxTileCol),A[1]-j*E.MinTileRow];if(void 0!==C&&!(0,u.r4)(C,I)){var R=n.WGS84BoundingBox,P=(0,c.U2)("EPSG:4326").getExtent();if(I=C,R)x=R[0]===P[0]&&R[2]===P[2];else{var N=(0,c.$A)(C,b.SupportedCRS,"EPSG:4326");x=N[0]-1e-10<=P[0]&&N[2]+1e-10>=P[2]}}var D=(0,h.b)(b,I,d),L=[],F=i.requestEncoding;if(F=void 0!==F?F:"","OperationsMetadata"in t&&"GetTile"in t.OperationsMetadata)for(var z=t.OperationsMetadata.GetTile.DCP.HTTP.Get,U=0,G=z.length;Ub||m>b;)y.push([Math.ceil(h/b),Math.ceil(m/b)]),b+=b;break;case v:for(var w=h,M=m;w>b||M>b;)y.push([Math.ceil(w/b),Math.ceil(M/b)]),w>>=1,M>>=1;break;default:(0,u.h)(!1,53)}y.push([1,1]),y.reverse();for(var x=[a],k=[0],S=1,E=y.length;Sc.maxTileCol||f.tileRowc.maxTileRow)return}(0,r.f0)(f,U);var d=e.replace(/\{(\w+?)\}/g,(function(t,i){return f[i]}));return(0,s.Kk)(G,d)}}}}function c(t,i){var e,n=i.tileMatrixSetLimits;if("map"===i.dataType)e=function(t,i){for(var e,n,r=0;ri?n:new Array(1+i-r).join("0")+n}function r(t,i){for(var e=(""+t).split("."),n=(""+i).split("."),r=0;ro)return 1;if(o>s)return-1}return 0}e.d(i,{v:function(){return n},n:function(){return r}})},68200:function(t,i,e){"use strict";var n=e(97854),r=function(t){this.highWaterMark=void 0!==t?t:2048,this.ny=0,this.sy={},this.oy=null,this.uy=null};r.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},r.prototype.clear=function(){this.ny=0,this.sy={},this.oy=null,this.uy=null},r.prototype.containsKey=function(t){return this.sy.hasOwnProperty(t)},r.prototype.forEach=function(t){for(var i=this.oy;i;)t(i.hy,i.fm,this),i=i.newer},r.prototype.get=function(t,i){var e=this.sy[t];return(0,n.h)(void 0!==e,15),e===this.uy||(e===this.oy?(this.oy=this.oy.newer,this.oy.older=null):(e.newer.older=e.older,e.older.newer=e.newer),e.newer=null,e.older=this.uy,this.uy.newer=e,this.uy=e),e.hy},r.prototype.remove=function(t){var i=this.sy[t];return(0,n.h)(void 0!==i,15),i===this.uy?(this.uy=i.older,this.uy&&(this.uy.newer=null)):i===this.oy?(this.oy=i.newer,this.oy&&(this.oy.older=null)):(i.newer.older=i.older,i.older.newer=i.newer),delete this.sy[t],--this.ny,i.hy},r.prototype.getCount=function(){return this.ny},r.prototype.getKeys=function(){var t,i=new Array(this.ny),e=0;for(t=this.uy;t;t=t.older)i[e++]=t.fm;return i},r.prototype.getValues=function(){var t,i=new Array(this.ny),e=0;for(t=this.uy;t;t=t.older)i[e++]=t.hy;return i},r.prototype.peekLast=function(){return this.oy.hy},r.prototype.peekLastKey=function(){return this.oy.fm},r.prototype.peekFirstKey=function(){return this.uy.fm},r.prototype.pop=function(){var t=this.oy;return delete this.sy[t.fm],t.newer&&(t.newer.older=null),this.oy=t.newer,this.oy||(this.uy=null),--this.ny,t.hy},r.prototype.replace=function(t,i){this.get(t),this.sy[t].hy=i},r.prototype.set=function(t,i){(0,n.h)(!(t in this.sy),16);var e={fm:t,newer:null,older:this.uy,hy:i};this.uy?this.uy.newer=e:this.oy=e,this.uy=e,this.sy[t]=e,++this.ny},r.prototype.setSize=function(t){this.highWaterMark=t},i.Z=r},8870:function(t,i,e){"use strict";var n=e(78476),r=e(85409),s=e(77097),o=e(79309),a=function(t){this.ly=new n(t),this.vy={}};a.prototype.insert=function(t,i){var e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:i};this.ly.insert(e),this.vy[(0,s.sq)(i)]=e},a.prototype.load=function(t,i){for(var e=new Array(i.length),n=0,r=i.length;n0,6);var g=void 0!==e.src?o.Z.IDLE:o.Z.LOADED;this.wy=void 0!==e.color?(0,u._2)(e.color):null,this.jy=function(t,i,e,n,r,s){var o=l.c.get(i,n,s);return o||(o=new p(t,i,e,n,r,s),l.c.set(i,n,s,o)),o}(d,y,v,this.jt,g,this.wy),this.Cy=void 0!==e.offset?e.offset:[0,0],this.Iy=void 0!==e.offsetOrigin?e.offsetOrigin:s.Z.TOP_LEFT,this.Ry=null,this.Jd=void 0!==e.size?e.size:null}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.clone=function(){var t=this.getScale();return new i({anchor:this.Go.slice(),anchorOrigin:this._y,anchorXUnits:this.Ay,anchorYUnits:this.Oy,crossOrigin:this.jt,color:this.wy&&this.wy.slice?this.wy.slice():this.wy||void 0,src:this.getSrc(),offset:this.Cy.slice(),offsetOrigin:this.Iy,size:null!==this.Jd?this.Jd.slice():void 0,opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView()})},i.prototype.getAnchor=function(){if(this.Ty)return this.Ty;var t=this.Go,i=this.getSize();if(this.Ay==r.Z.FRACTION||this.Oy==r.Z.FRACTION){if(!i)return null;t=this.Go.slice(),this.Ay==r.Z.FRACTION&&(t[0]*=i[0]),this.Oy==r.Z.FRACTION&&(t[1]*=i[1])}if(this._y!=s.Z.TOP_LEFT){if(!i)return null;t===this.Go&&(t=this.Go.slice()),this._y!=s.Z.TOP_RIGHT&&this._y!=s.Z.BOTTOM_RIGHT||(t[0]=-t[0]+i[0]),this._y!=s.Z.BOTTOM_LEFT&&this._y!=s.Z.BOTTOM_RIGHT||(t[1]=-t[1]+i[1])}var e=this.getDisplacement();return t[0]-=e[0],t[1]+=e[1],this.Ty=t,this.Ty},i.prototype.setAnchor=function(t){this.Go=t,this.Ty=null},i.prototype.getColor=function(){return this.wy},i.prototype.getImage=function(t){return this.jy.getImage(t)},i.prototype.getPixelRatio=function(t){return this.jy.getPixelRatio(t)},i.prototype.getImageSize=function(){return this.jy.getSize()},i.prototype.getImageState=function(){return this.jy.getImageState()},i.prototype.getHitDetectionImage=function(){return this.jy.getHitDetectionImage()},i.prototype.getOrigin=function(){if(this.Ry)return this.Ry;var t=this.Cy;if(this.Iy!=s.Z.TOP_LEFT){var i=this.getSize(),e=this.jy.getSize();if(!i||!e)return null;t=t.slice(),this.Iy!=s.Z.TOP_RIGHT&&this.Iy!=s.Z.BOTTOM_RIGHT||(t[0]=e[0]-i[0]-t[0]),this.Iy!=s.Z.BOTTOM_LEFT&&this.Iy!=s.Z.BOTTOM_RIGHT||(t[1]=e[1]-i[1]-t[1])}return this.Ry=t,this.Ry},i.prototype.getSrc=function(){return this.jy.getSrc()},i.prototype.getSize=function(){return this.Jd?this.Jd:this.jy.getSize()},i.prototype.listenImageChange=function(t){this.jy.addEventListener(n.Z.CHANGE,t)},i.prototype.load=function(){this.jy.load()},i.prototype.unlistenImageChange=function(t){this.jy.removeEventListener(n.Z.CHANGE,t)},i}(a.Z)},77395:function(t,i){"use strict";i.Z={FRACTION:"fraction",PIXELS:"pixels"}},37273:function(t,i,e){"use strict";e.d(i,{c:function(){return o}});var n=e(7492),r=function(){this.Py={},this.kc=0,this.Ny=32};function s(t,i,e){return i+":"+t+":"+(e?(0,n.XC)(e):"null")}r.prototype.clear=function(){this.Py={},this.kc=0},r.prototype.canExpireCache=function(){return this.kc>this.Ny},r.prototype.expire=function(){if(this.canExpireCache()){var t=0;for(var i in this.Py){var e=this.Py[i];0!=(3&t++)||e.hasListener()||(delete this.Py[i],--this.kc)}}},r.prototype.get=function(t,i,e){var n=s(t,i,e);return n in this.Py?this.Py[n]:null},r.prototype.set=function(t,i,e,n){var r=s(t,i,e);this.Py[r]=n,++this.kc},r.prototype.setSize=function(t){this.Ny=t,this.expire()};var o=new r},15731:function(t,i){"use strict";i.Z={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"}},53362:function(t,i,e){"use strict";var n=e(77097),r=e(73926),s=function(t){this.Wc=t.opacity,this.Dn=t.rotateWithView,this.Ke=t.rotation,this.Xc=t.scale,this.Dy=(0,r.Pq)(t.scale),this.Fy=t.displacement};s.prototype.clone=function(){var t=this.getScale();return new s({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},s.prototype.getOpacity=function(){return this.Wc},s.prototype.getRotateWithView=function(){return this.Dn},s.prototype.getRotation=function(){return this.Ke},s.prototype.getScale=function(){return this.Xc},s.prototype.getScaleArray=function(){return this.Dy},s.prototype.getDisplacement=function(){return this.Fy},s.prototype.getAnchor=function(){return(0,n.O3)()},s.prototype.getImage=function(t){return(0,n.O3)()},s.prototype.getHitDetectionImage=function(){return(0,n.O3)()},s.prototype.getPixelRatio=function(t){return 1},s.prototype.getImageState=function(){return(0,n.O3)()},s.prototype.getImageSize=function(){return(0,n.O3)()},s.prototype.getOrigin=function(){return(0,n.O3)()},s.prototype.getSize=function(){return(0,n.O3)()},s.prototype.setOpacity=function(t){this.Wc=t},s.prototype.setRotateWithView=function(t){this.Dn=t},s.prototype.setRotation=function(t){this.Ke=t},s.prototype.setScale=function(t){this.Xc=t,this.Dy=(0,r.Pq)(t)},s.prototype.listenImageChange=function(t){(0,n.O3)()},s.prototype.load=function(){(0,n.O3)()},s.prototype.unlistenImageChange=function(t){(0,n.O3)()},i.Z=s},87300:function(t,i,e){"use strict";var n=e(94343),r=e(53362),s=e(7492),o=e(69019),a=e(70956),u=e(80745),h=function(t){function i(i){var e=void 0!==i.rotateWithView&&i.rotateWithView;t.call(this,{opacity:1,rotateWithView:e,rotation:void 0!==i.rotation?i.rotation:0,scale:void 0!==i.scale?i.scale:1,displacement:void 0!==i.displacement?i.displacement:[0,0]}),this._t=void 0,this.zy=null,this.bl=void 0!==i.fill?i.fill:null,this.Ry=[0,0],this.Fo=i.points,this.gy=void 0!==i.radius?i.radius:i.radius1,this.Uy=i.radius2,this.zo=void 0!==i.angle?i.angle:0,this.Gy=void 0!==i.stroke?i.stroke:null,this.Go=null,this.Jd=null,this.By=null,this.render()}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.clone=function(){var t=this.getScale(),e=new i({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return e.setOpacity(this.getOpacity()),e},i.prototype.getAnchor=function(){return this.Go},i.prototype.getAngle=function(){return this.zo},i.prototype.getFill=function(){return this.bl},i.prototype.getHitDetectionImage=function(){return this.zy||this.qy(this.By),this.zy},i.prototype.getImage=function(t){var i=this._t[t];if(!i){var e=this.By,n=(0,a.E4)(e.size*t,e.size*t);this.Vy(e,n,t),i=n.canvas,this._t[t]=i}return i},i.prototype.getPixelRatio=function(t){return t},i.prototype.getImageSize=function(){return this.Jd},i.prototype.getImageState=function(){return n.Z.LOADED},i.prototype.getOrigin=function(){return this.Ry},i.prototype.getPoints=function(){return this.Fo},i.prototype.getRadius=function(){return this.gy},i.prototype.getRadius2=function(){return this.Uy},i.prototype.getSize=function(){return this.Jd},i.prototype.getStroke=function(){return this.Gy},i.prototype.listenImageChange=function(t){},i.prototype.load=function(){},i.prototype.unlistenImageChange=function(t){},i.prototype.Zy=function(t,i,e){if(0===i||this.Fo===1/0||"bevel"!==t&&"miter"!==t)return i;var n=this.gy,r=void 0===this.Uy?n:this.Uy;if(n4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec"+t.length+"("+t.map(u).join(", ")+")"}function f(t,i){return void 0===t.stringLiteralsMap[i]&&(t.stringLiteralsMap[i]=Object.keys(t.stringLiteralsMap).length),t.stringLiteralsMap[i]}function c(t,i,e){if(Array.isArray(i)&&"string"==typeof i[0]){var n=o[i[0]];if(void 0===n)throw new Error("Unrecognized expression operator: "+JSON.stringify(i));return n.toGlsl(t,i.slice(1),e)}var c,l,d=a(i);if((d&s.NUMBER)>0)return u(i);if((d&s.BOOLEAN)>0)return i.toString();if((d&s.STRING)>0&&(void 0===e||e==s.STRING))return function(t,i){return u(f(t,i))}(t,i.toString());if((d&s.COLOR)>0&&(void 0===e||e==s.COLOR))return c=i,(l=(0,r._2)(c).slice()).length<4&&l.push(1),h(l.map((function(t,i){return i<3?t/255:t})));if((d&s.NUMBER_ARRAY)>0)return h(i);throw new Error("Unexpected expression "+i+" (expected type "+e+")")}function l(t){if(!(a(t)&s.NUMBER))throw new Error("A numeric value was expected, got "+JSON.stringify(t)+" instead")}function d(t){for(var i=0;ii)throw new Error("At most "+i+" arguments were expected, got "+t.length+" instead")}function b(t){if(t.length%2!=0)throw new Error("An even amount of arguments was expected, got "+t+" instead")}function w(t,i){if(e=i,Math.log2(e)%1!=0)throw new Error("Could not infer only one type from the following expression: "+JSON.stringify(t));var e}function M(t){return"u_var_"+t}function x(t){return{getReturnType:function(t){return s.BOOLEAN},toGlsl:function(i,e){m(e,2);for(var n=s.ANY,r=0;r"]={getReturnType:function(t){return s.BOOLEAN},toGlsl:function(t,i){return m(i,2),d(i),"("+c(t,i[0])+" > "+c(t,i[1])+")"}},o[">="]={getReturnType:function(t){return s.BOOLEAN},toGlsl:function(t,i){return m(i,2),d(i),"("+c(t,i[0])+" >= "+c(t,i[1])+")"}},o["<"]={getReturnType:function(t){return s.BOOLEAN},toGlsl:function(t,i){return m(i,2),d(i),"("+c(t,i[0])+" < "+c(t,i[1])+")"}},o["<="]={getReturnType:function(t){return s.BOOLEAN},toGlsl:function(t,i){return m(i,2),d(i),"("+c(t,i[0])+" <= "+c(t,i[1])+")"}},o["=="]=x("=="),o["!="]=x("!="),o["!"]={getReturnType:function(t){return s.BOOLEAN},toGlsl:function(t,i){return m(i,1),p(i[0]),"(!"+c(t,i[0])+")"}},o.all=k("&&"),o.any=k("||"),o.between={getReturnType:function(t){return s.BOOLEAN},toGlsl:function(t,i){m(i,3),d(i);var e=c(t,i[1]),n=c(t,i[2]),r=c(t,i[0]);return"("+r+" >= "+e+" && "+r+" <= "+n+")"}},o.array={getReturnType:function(t){return s.NUMBER_ARRAY},toGlsl:function(t,i){y(i,2),g(i,4),d(i);var e=i.map((function(i){return c(t,i,s.NUMBER)}));return"vec"+i.length+"("+e.join(", ")+")"}},o.color={getReturnType:function(t){return s.COLOR},toGlsl:function(t,i){y(i,3),g(i,4),d(i);var e=i;3===i.length&&e.push(1);var n=i.map((function(i,e){return c(t,i,s.NUMBER)+(e<3?" / 255.0":"")}));return"vec"+i.length+"("+n.join(", ")+")"}},o.interpolate={getReturnType:function(t){for(var i=s.COLOR|s.NUMBER,e=3;e=1;f-=2){h="("+a+" == "+c(t,i[f])+" ? "+c(t,i[f+1],r)+" : "+(h||u)+")"}return h}},o.case={getReturnType:function(t){for(var i=s.ANY,e=1;e=0;f-=2){h="("+c(t,i[f])+" ? "+c(t,i[f+1],r)+" : "+(h||u)+")"}return h}}},10056:function(t,i,e){"use strict";function n(t,i,e,n){return void 0!==n?(n[0]=t,n[1]=i,n[2]=e,n):[t,i,e]}function r(t,i,e){return t+"/"+i+"/"+e}function s(t){return r(t[0],t[1],t[2])}function o(t){var i=t.substring(t.lastIndexOf("/")+1,t.length).split(",").map(Number);return r(i[0],i[1],i[2])}function a(t){return t.split("/").map(Number)}function u(t){return(t[1]<e||e>i.getMaxZoom())return!1;var s=i.getFullTileRange(e);return!s||s.containsXY(n,r)}e.d(i,{T9:function(){return n},lg:function(){return r},km:function(){return s},MY:function(){return o},Ul:function(){return a},vp:function(){return u},tE:function(){return h}})},61430:function(t,i,e){"use strict";e.d(i,{X$:function(){return f},Cf:function(){return c},dl:function(){return l},RZ:function(){return v},Tl:function(){return p}});var n=e(1812),r=e(71840),s=e(37201),o=e(85711),a=e(62896),u=e(85409),h=e(73926);function f(t){var i=t.getDefaultTileGrid();return i||(i=v(t),t.setDefaultTileGrid(i)),i}function c(t,i,e){var n=i[0],r=t.getTileCoordCenter(i),s=p(e);if((0,u.b8)(s,r))return i;var o=(0,u.dz)(s),a=Math.ceil((s[0]-r[0])/o);return r[0]+=o*a,t.getTileCoordForCoordAndZ(r,n)}function l(t){var i=t||{},e=i.extent||(0,a.U2)("EPSG:3857").getExtent(),n={extent:e,minZoom:i.minZoom,tileSize:i.tileSize,resolutions:d(e,i.maxZoom,i.tileSize,i.maxResolution)};return new r.Z(n)}function d(t,i,e,n){for(var r=void 0!==i?i:o.e,s=(0,u.Cr)(t),a=(0,u.dz)(t),f=(0,h.Pq)(void 0!==e?e:o.S),c=n>0?n:Math.max(a/f[0],s/f[1]),l=r+1,d=new Array(l),v=0;v=this.minZoom;){if(2===this.Ee?(o=Math.floor(o/2),a=Math.floor(a/2),s=(0,n.T)(o,o,a,a,e)):s=this.getTileRangeForExtentAndZ(u,h,e),i(h,s))return!0;--h}return!1},l.prototype.getExtent=function(){return this.ho},l.prototype.getMaxZoom=function(){return this.maxZoom},l.prototype.getMinZoom=function(){return this.minZoom},l.prototype.getOrigin=function(t){return this.Ry?this.Ry:this.pg[t]},l.prototype.getResolution=function(t){return this.Te[t]},l.prototype.getResolutions=function(){return this.Te},l.prototype.getTileCoordChildTileRange=function(t,i,e){if(t[0]this.maxZoom||i0)||(0,r.sE)(c,(function(e){return i.Identifier==e.TileMatrix||-1===i.Identifier.indexOf(":")&&t.Identifier+":"+i.Identifier===e.TileMatrix}))){a.push(i.Identifier);var e=28e-5*i.ScaleDenominator/v,s=i.TileWidth,o=i.TileHeight;p?u.push([i.TopLeftCorner[1],i.TopLeftCorner[0]]):u.push(i.TopLeftCorner),n.push(e),h.push(s==o?s:[s,o]),f.push([i.MatrixWidth,i.MatrixHeight])}})),new o({extent:i,origins:u,resolutions:n,matrixIds:a,tileSizes:h,sizes:f})}i.Z=o},85711:function(t,i,e){"use strict";e.d(i,{e:function(){return n},S:function(){return r}});var n=42,r=256},27270:function(t,i,e){"use strict";e.d(i,{uR:function(){return a},Un:function(){return u},vU:function(){return h},Gk:function(){return f}});var n=e(97854),r=e(215),s=e(10056);function o(t,i){var e=/\{z\}/g,r=/\{x\}/g,s=/\{y\}/g,o=/\{-y\}/g;return function(a,u,h){return a?t.replace(e,a[0].toString()).replace(r,a[1].toString()).replace(s,a[2].toString()).replace(o,(function(){var t=a[0],e=i.getFullTileRange(t);return(0,n.h)(e,55),(e.getHeight()-a[2]-1).toString()})):void 0}}function a(t,i){for(var e=t.length,n=new Array(e),r=0;r=0;o--)this.Kg[o].init(t);e.bindTexture(e.TEXTURE_2D,null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.BLEND),e.blendFunc(e.ONE,i?e.ZERO:e.ONE_MINUS_SRC_ALPHA),e.useProgram(this.Bg),this.applyFrameState(t),this.applyUniforms(t)},i.prototype.prepareDrawToRenderTarget=function(t,i,e){var n=this.getGL(),r=i.getSize();n.bindFramebuffer(n.FRAMEBUFFER,i.getFramebuffer()),n.viewport(0,0,r[0],r[1]),n.bindTexture(n.TEXTURE_2D,i.getTexture()),n.clearColor(0,0,0,0),n.clear(n.COLOR_BUFFER_BIT),n.enable(n.BLEND),n.blendFunc(n.ONE,e?n.ZERO:n.ONE_MINUS_SRC_ALPHA),n.useProgram(this.Bg),this.applyFrameState(t),this.applyUniforms(t)},i.prototype.drawElements=function(t,i){var e=this.getGL(),n=e.UNSIGNED_INT,r=i-t,s=4*t;e.drawElements(e.TRIANGLES,r,n,s)},i.prototype.finalizeDraw=function(t){for(var i=0;i`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`. If specified as a string for a vector tile source, the same property is used across all its source layers."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster:{type:{required:!0,type:"enum",values:{raster:{doc:"A raster tile source."}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},scheme:{type:"enum",values:{xyz:{doc:"Slippy map tilenames scheme."},tms:{doc:"OSGeo spec scheme."}},default:"xyz",doc:"Influences the y direction of the tile coordinates. The global-mercator (aka Spherical Mercator) profile is assumed."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{doc:"A RGB-encoded raster DEM source"}},doc:"The type of the source."},url:{type:"string",doc:"A URL to a TileJSON resource. Supported protocols are `http:`, `https:`, and `mapbox://`."},tiles:{type:"array",value:"string",doc:"An array of one or more tile source URLs, as in the TileJSON spec."},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129],doc:"An array containing the longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `[sw.lng, sw.lat, ne.lng, ne.lat]`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL."},minzoom:{type:"number",default:0,doc:"Minimum zoom level for which tiles are available, as in the TileJSON spec."},maxzoom:{type:"number",default:22,doc:"Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels."},tileSize:{type:"number",default:512,units:"pixels",doc:"The minimum visual size to display tiles for this layer. Only configurable for raster layers."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},encoding:{type:"enum",values:{terrarium:{doc:"Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info."},mapbox:{doc:"Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info."}},default:"mapbox",doc:"The encoding used by this source. Mapbox Terrain RGB is used by default"},volatile:{type:"boolean",default:!1,doc:"A setting to determine whether a source's tiles are cached locally.","sdk-support":{"basic functionality":{android:"9.3.0",ios:"5.10.0"}}},"*":{type:"*",doc:"Other keys to configure the data source."}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{doc:"A GeoJSON data source."}},doc:"The data type of the GeoJSON source."},data:{type:"*",doc:"A URL to a GeoJSON file, or inline GeoJSON."},maxzoom:{type:"number",default:18,doc:"Maximum zoom level at which to create vector tiles (higher means greater detail at high zoom levels)."},attribution:{type:"string",doc:"Contains an attribution to be displayed when the map is shown to a user."},buffer:{type:"number",default:128,maximum:512,minimum:0,doc:"Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance."},filter:{type:"*",doc:"An expression for filtering features prior to processing them for rendering."},tolerance:{type:"number",default:.375,doc:"Douglas-Peucker simplification tolerance (higher means simpler geometries and faster performance)."},cluster:{type:"boolean",default:!1,doc:"If the data is a collection of point features, setting this to true clusters the points by radius into groups. Cluster groups become new `Point` features in the source with additional properties:\n * `cluster` Is `true` if the point is a cluster \n * `cluster_id` A unqiue id for the cluster to be used in conjunction with the [cluster inspection methods](https://www.mapbox.com/mapbox-gl-js/api/#geojsonsource#getclusterexpansionzoom)\n * `point_count` Number of original points grouped into this cluster\n * `point_count_abbreviated` An abbreviated point count"},clusterRadius:{type:"number",default:50,minimum:0,doc:"Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile."},clusterMaxZoom:{type:"number",doc:"Max zoom on which to cluster points if clustering is enabled. Defaults to one zoom less than maxzoom (so that last zoom features are not clustered). Clusters are re-evaluated at integer zoom levels so setting clusterMaxZoom to 14 means the clusters will be displayed until z15."},clusterMinPoints:{type:"number",doc:"Minimum number of points necessary to form a cluster if clustering is enabled. Defaults to `2`."},clusterProperties:{type:"*",doc:'An object defining custom properties on the generated clusters if clustering is enabled, aggregating values from clustered points. Has the form `{"property_name": [operator, map_expression]}`. `operator` is any expression function that accepts at least 2 operands (e.g. `"+"` or `"max"`) — it accumulates the property value from clusters/points the cluster contains; `map_expression` produces the value of a single point.\n\nExample: `{"sum": ["+", ["get", "scalerank"]]}`.\n\nFor more advanced use cases, in place of `operator`, you can use a custom reduce expression that references a special `["accumulated"]` value, e.g.:\n`{"sum": [["+", ["accumulated"], ["get", "sum"]], ["get", "scalerank"]]}`'},lineMetrics:{type:"boolean",default:!1,doc:"Whether to calculate line distance metrics. This is required for line layers that specify `line-gradient` values."},generateId:{type:"boolean",default:!1,doc:"Whether to generate ids for the geojson features. When enabled, the `feature.id` property will be auto assigned based on its index in the `features` array, over-writing any previous values."},promoteId:{type:"promoteId",doc:"A property to use as a feature id (for feature state). Either a property name, or an object of the form `{: }`."}},source_video:{type:{required:!0,type:"enum",values:{video:{doc:"A video data source."}},doc:"The data type of the video source."},urls:{required:!0,type:"array",value:"string",doc:"URLs to video content in order of preferred format."},coordinates:{required:!0,doc:"Corners of video specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},source_image:{type:{required:!0,type:"enum",values:{image:{doc:"An image data source."}},doc:"The data type of the image source."},url:{required:!0,type:"string",doc:"URL that points to an image."},coordinates:{required:!0,doc:"Corners of image specified in longitude, latitude pairs.",type:"array",length:4,value:{type:"array",length:2,value:"number",doc:"A single longitude, latitude pair."}}},layer:{id:{type:"string",doc:"Unique layer name.",required:!0},type:{type:"enum",values:{fill:{doc:"A filled polygon with an optional stroked border.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},line:{doc:"A stroked line.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},symbol:{doc:"An icon or a text label.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},circle:{doc:"A filled circle.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},heatmap:{doc:"A heatmap.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"fill-extrusion":{doc:"An extruded (3D) polygon.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},raster:{doc:"Raster map textures such as satellite imagery.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},hillshade:{doc:"Client-side hillshading visualization based on DEM data. Currently, the implementation only supports Mapbox Terrain RGB and Mapzen Terrarium tiles.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},background:{doc:"The background color or pattern of the map.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}}},sky:{doc:"A spherical dome around the map that is always rendered behind all other layers.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},doc:"Rendering type of this layer.",required:!0},metadata:{type:"*",doc:"Arbitrary properties useful to track with the layer, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'."},source:{type:"string",doc:"Name of a source description to be used for this layer. Required for all layer types except `background`."},"source-layer":{type:"string",doc:"Layer to use from a vector tile source. Required for vector tile sources; prohibited for all other source types, including GeoJSON sources."},minzoom:{type:"number",minimum:0,maximum:24,doc:"The minimum zoom level for the layer. At zoom levels less than the minzoom, the layer will be hidden."},maxzoom:{type:"number",minimum:0,maximum:24,doc:"The maximum zoom level for the layer. At zoom levels equal to or greater than the maxzoom, the layer will be hidden."},filter:{type:"filter",doc:"A expression specifying conditions on source features. Only features that match the filter are displayed. Zoom expressions in filters are only evaluated at integer zoom levels. The `feature-state` expression is not supported in filter expressions."},layout:{type:"layout",doc:"Layout properties for the layer."},paint:{type:"paint",doc:"Default paint properties for this layer."}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background","layout_sky"],layout_background:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_sky:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"},"data-driven styling":{js:"1.2.0",android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},"property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{doc:"A cap with a squared-off end which is drawn to the exact endpoint of the line."},round:{doc:"A cap with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},square:{doc:"A cap with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."}},default:"butt",doc:"The display of line endings.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-join":{type:"enum",values:{bevel:{doc:"A join with a squared-off end which is drawn beyond the endpoint of the line at a distance of one-half of the line's width."},round:{doc:"A join with a rounded end which is drawn beyond the endpoint of the line at a radius of one-half of the line's width and centered on the endpoint of the line."},miter:{doc:"A join with a sharp, angled corner which is drawn with the outer sides beyond the endpoint of the path until they meet."}},default:"miter",doc:"The display of lines when joining.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,doc:"Used to automatically convert miter joins to bevel joins for sharp angles.",requires:[{"line-join":"miter"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,doc:"Used to automatically convert round joins to miter joins for shallow angles.",requires:[{"line-join":"round"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with a higher sort key will appear above features with a lower sort key.","sdk-support":{"basic functionality":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"},"data-driven styling":{js:"1.2.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{doc:"The label is placed at the point where the geometry is located."},line:{doc:"The label is placed along the line of the geometry. Can only be used on `LineString` and `Polygon` geometries."},"line-center":{doc:"The label is placed at the center of the line of the geometry. Can only be used on `LineString` and `Polygon` geometries. Note that a single feature in a vector tile may contain multiple line geometries."}},default:"point",doc:"Label placement relative to its geometry.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`line-center` value":{js:"0.47.0",android:"6.4.0",ios:"4.3.0",macos:"0.10.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",doc:"Distance between two symbol anchors.",requires:[{"symbol-placement":"line"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,doc:"If true, the symbols will not cross tile edges to avoid mutual collisions. Recommended in layers that don't have enough padding in the vector tile to prevent collisions, or if it is a point symbol layer placed after a line symbol layer. When using a client that supports global collision detection, like Mapbox GL JS version 0.42.0 or greater, enabling this property is not needed to prevent clipped labels at tile boundaries.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",doc:"Sorts features in ascending order based on this value. Features with lower sort keys are drawn and placed first. When `icon-allow-overlap` or `text-allow-overlap` is `false`, features with a lower sort key will have priority during placement. When `icon-allow-overlap` or `text-allow-overlap` is set to `true`, features with a higher sort key will overlap over features with a lower sort key.","sdk-support":{"basic functionality":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"},"data-driven styling":{js:"0.53.0",android:"7.4.0",ios:"4.11.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},"viewport-y":{doc:"Sorts symbols by their y-position relative to the viewport if `icon-allow-overlap` or `text-allow-overlap` is set to `true` or `icon-ignore-placement` or `text-ignore-placement` is `false`."},source:{doc:"Sorts symbols by `symbol-sort-key` if set. Otherwise, no sorting is applied; symbols are rendered in the same order as the source data."}},default:"auto",doc:"Determines whether overlapping symbols in the same layer are rendered in the order that they appear in the data source or by their y-position relative to the viewport. To control the order and prioritization of symbols otherwise, use `symbol-sort-key`.","sdk-support":{"basic functionality":{js:"0.49.0",android:"6.6.0",ios:"4.5.0",macos:"0.12.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,doc:"If true, the icon will be visible even if it collides with other previously drawn symbols.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the icon.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,doc:"If true, text will display without their corresponding icons when the icon collides with other symbols and the text does not.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns icons east-west. When `symbol-placement` is set to `line` or `line-center`, aligns icon x-axes with the line."},viewport:{doc:"Produces icons whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",doc:"Scales the original size of the icon by the provided factor. The new pixel size of the image will be the original pixel size multiplied by `icon-size`. 1 is the original size; 3 triples the size of the image.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{doc:"The icon is displayed at its intrinsic aspect ratio."},width:{doc:"The icon is scaled in the x-dimension to fit the width of the text."},height:{doc:"The icon is scaled in the y-dimension to fit the height of the text."},both:{doc:"The icon is scaled in both x- and y-dimensions."}},default:"none",doc:"Scales the icon to fit around the associated text.",requires:["icon-image","text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"stretchable icons":{js:"1.6.0",android:"9.2.0",ios:"5.8.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",doc:"Size of the additional area added to dimensions determined by `icon-text-fit`, in clockwise order: top, right, bottom, left.",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",doc:"Name of image in sprite to use for drawing an image background.",tokens:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the icon clockwise.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the icon bounding box used for detecting symbol collisions.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,doc:"If true, the icon may be flipped to prevent it from being rendered upside-down.",requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],doc:"Offset distance of icon from its anchor. Positive values indicate right and down, while negative values indicate left and up. Each component is multiplied by the value of `icon-size` to obtain the final offset in pixels. When combined with `icon-rotate` the offset will be as if the rotated direction was up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{doc:"The center of the icon is placed closest to the anchor."},left:{doc:"The left side of the icon is placed closest to the anchor."},right:{doc:"The right side of the icon is placed closest to the anchor."},top:{doc:"The top of the icon is placed closest to the anchor."},bottom:{doc:"The bottom of the icon is placed closest to the anchor."},"top-left":{doc:"The top left corner of the icon is placed closest to the anchor."},"top-right":{doc:"The top right corner of the icon is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the icon is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the icon is placed closest to the anchor."}},default:"center",doc:"Part of the icon placed closest to the anchor.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{doc:"The icon is aligned to the plane of the map."},viewport:{doc:"The icon is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `icon-rotation-alignment`."}},default:"auto",doc:"Orientation of icon when map is pitched.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{doc:"The text is aligned to the plane of the map."},viewport:{doc:"The text is aligned to the plane of the viewport."},auto:{doc:"Automatically matches the value of `text-rotation-alignment`."}},default:"auto",doc:"Orientation of text when map is pitched.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{doc:"When `symbol-placement` is set to `point`, aligns text east-west. When `symbol-placement` is set to `line` or `line-center`, aligns text x-axes with the line."},viewport:{doc:"Produces glyphs whose x-axes are aligned with the x-axis of the viewport, regardless of the value of `symbol-placement`."},auto:{doc:"When `symbol-placement` is set to `point`, this is equivalent to `viewport`. When `symbol-placement` is set to `line` or `line-center`, this is equivalent to `map`."}},default:"auto",doc:"In combination with `symbol-placement`, determines the rotation behavior of the individual glyphs forming the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"`auto` value":{js:"0.25.0",android:"4.2.0",ios:"3.4.0",macos:"0.3.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,doc:"Value to use for a text label. If a plain `string` is provided, it will be treated as a `formatted` with default/inherited formatting options.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],doc:"Font stack to use for displaying text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",doc:"Font size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",doc:"The maximum line width for text wrapping.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",doc:"Text leading value for multi-line text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-letter-spacing":{type:"number",default:0,units:"ems",doc:"Text tracking amount.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.40.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{doc:"The text is aligned towards the anchor position."},left:{doc:"The text is aligned to the left."},center:{doc:"The text is centered."},right:{doc:"The text is aligned to the right."}},default:"center",doc:"Text justification options.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"},auto:{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,doc:"Radial offset of text, in the direction of the symbol's anchor. Useful in combination with `text-variable-anchor`, which defaults to using the two-dimensional `text-offset` if present.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"},"data-driven styling":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},requires:["text-field",{"symbol-placement":["point"]}],doc:"To increase the chance of placing high-priority labels on the map, you can provide an array of `text-anchor` locations: the renderer will attempt to place the label at each location, in order, before moving onto the next label. Use `text-justify: auto` to choose justification based on anchor position. To apply an offset, use the `text-radial-offset` or the two-dimensional `text-offset`.","sdk-support":{"basic functionality":{js:"0.54.0",android:"7.4.0",ios:"4.10.0",macos:"0.14.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{doc:"The center of the text is placed closest to the anchor."},left:{doc:"The left side of the text is placed closest to the anchor."},right:{doc:"The right side of the text is placed closest to the anchor."},top:{doc:"The top of the text is placed closest to the anchor."},bottom:{doc:"The bottom of the text is placed closest to the anchor."},"top-left":{doc:"The top left corner of the text is placed closest to the anchor."},"top-right":{doc:"The top right corner of the text is placed closest to the anchor."},"bottom-left":{doc:"The bottom left corner of the text is placed closest to the anchor."},"bottom-right":{doc:"The bottom right corner of the text is placed closest to the anchor."}},default:"center",doc:"Part of the text placed closest to the anchor.",requires:["text-field",{"!":"text-variable-anchor"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",doc:"Maximum angle change between adjacent characters.",requires:["text-field",{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{doc:"If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally."},vertical:{doc:"If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically."}},doc:"The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.",requires:["text-field",{"symbol-placement":["point"]}],"sdk-support":{"basic functionality":{js:"1.3.0",android:"8.3.0",ios:"5.3.0",macos:"0.15.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",doc:"Rotates the text clockwise.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",doc:"Size of the additional area around the text bounding box used for detecting symbol collisions.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,doc:"If true, the text may be flipped vertically to prevent it from being rendered upside-down.",requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{doc:"The text is not altered."},uppercase:{doc:"Forces all letters to be displayed in uppercase."},lowercase:{doc:"Forces all letters to be displayed in lowercase."}},default:"none",doc:"Specifies how to capitalize text, similar to the CSS `text-transform` property.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",doc:"Offset distance of text from its anchor. Positive values indicate right and down, while negative values indicate left and up. If used with text-variable-anchor, input values will be taken as absolute values. Offsets along the x- and y-axis will be applied automatically based on the anchor position.",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.35.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,doc:"If true, the text will be visible even if it collides with other previously drawn symbols.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,doc:"If true, other symbols can be visible even if they collide with the text.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,doc:"If true, icons will display without their corresponding text when the text collides with other symbols and the icon does not.",requires:["text-field","icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},"property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{doc:"The layer is shown."},none:{doc:"The layer is not shown."}},default:"visible",doc:"Whether this layer is displayed.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},"property-type":"constant"}},filter:{type:"array",value:"*",doc:"A filter selects specific features from a layer."},filter_operator:{type:"enum",values:{"==":{doc:'`["==", key, value]` equality: `feature[key] = value`'},"!=":{doc:'`["!=", key, value]` inequality: `feature[key] ≠ value`'},">":{doc:'`[">", key, value]` greater than: `feature[key] > value`'},">=":{doc:'`[">=", key, value]` greater than or equal: `feature[key] ≥ value`'},"<":{doc:'`["<", key, value]` less than: `feature[key] < value`'},"<=":{doc:'`["<=", key, value]` less than or equal: `feature[key] ≤ value`'},in:{doc:'`["in", key, v0, ..., vn]` set inclusion: `feature[key] ∈ {v0, ..., vn}`'},"!in":{doc:'`["!in", key, v0, ..., vn]` set exclusion: `feature[key] ∉ {v0, ..., vn}`'},all:{doc:'`["all", f0, ..., fn]` logical `AND`: `f0 ∧ ... ∧ fn`'},any:{doc:'`["any", f0, ..., fn]` logical `OR`: `f0 ∨ ... ∨ fn`'},none:{doc:'`["none", f0, ..., fn]` logical `NOR`: `¬f0 ∧ ... ∧ ¬fn`'},has:{doc:'`["has", key]` `feature[key]` exists'},"!has":{doc:'`["!has", key]` `feature[key]` does not exist'},within:{doc:'`["within", object]` feature geometry is within object geometry'}},doc:"The filter operator."},geometry_type:{type:"enum",values:{Point:{doc:"Filter to point geometries."},LineString:{doc:"Filter to line geometries."},Polygon:{doc:"Filter to polygon geometries."}},doc:"The geometry type for the filter to select."},function:{expression:{type:"expression",doc:"An expression."},stops:{type:"array",doc:"An array of stops.",value:"function_stop"},base:{type:"number",default:1,minimum:0,doc:"The exponential base of the interpolation curve. It controls the rate at which the result increases. Higher values make the result increase more towards the high end of the range. With `1` the stops are interpolated linearly."},property:{type:"string",doc:"The name of a feature property to use as the function input.",default:"$zoom"},type:{type:"enum",values:{identity:{doc:"Return the input value as the output value."},exponential:{doc:"Generate an output by interpolating between stops just less than and just greater than the function input."},interval:{doc:"Return the output value of the stop just less than the function input."},categorical:{doc:"Return the output value of the stop equal to the function input."}},doc:"The interpolation strategy to use in function evaluation.",default:"exponential"},colorSpace:{type:"enum",values:{rgb:{doc:"Use the RGB color space to interpolate color values"},lab:{doc:"Use the LAB color space to interpolate color values."},hcl:{doc:"Use the HCL color space to interpolate color values, interpolating the Hue, Chroma, and Luminance channels individually."}},doc:"The color space in which colors interpolated. Interpolating colors in perceptual color spaces like LAB and HCL tend to produce color ramps that look more consistent and produce colors that can be differentiated more easily than those interpolated in RGB space.",default:"rgb"},default:{type:"*",required:!1,doc:"A value to serve as a fallback function result when a value isn't otherwise available. It is used in the following circumstances:\n* In categorical functions, when the feature value does not match any of the stop domain values.\n* In property and zoom-and-property functions, when a feature does not contain a value for the specified property.\n* In identity functions, when the feature value is not valid for the style property (for example, if the function is being used for a `circle-color` property but the feature property value is not a string or not a valid color).\n* In interval or exponential property and zoom-and-property functions, when the feature value is not numeric.\nIf no default is provided, the style property's default is used in these circumstances."}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2,doc:"Zoom level and value pair."},expression:{type:"array",value:"*",minimum:1,doc:"An expression defines a function that can be used for data-driven style properties or feature filters."},expression_name:{doc:"",type:"enum",values:{let:{doc:'Binds expressions to named variables, which can then be referenced in the result expression using ["var", "variable_name"].',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},var:{doc:'References variable bound using "let".',group:"Variable binding","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},literal:{doc:"Provides a literal array or object value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},array:{doc:"Asserts that the input is an array (optionally with a specific item type and length). If, when the input expression is evaluated, it is not of the asserted type, then this assertion will cause the whole expression to be aborted.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},at:{doc:"Retrieves an item from an array.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},in:{doc:"Determines whether an item exists in an array or a substring exists in a string.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.6.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"index-of":{doc:"Returns the first position at which an item can be found in an array or a substring can be found in a string, or `-1` if the input cannot be found. Accepts an optional index from where to begin the search.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},slice:{doc:"Returns an item from an array or a substring from a string from a specified start index, or between a start index and an end index if set. The return value is inclusive of the start index but not of the end index.",group:"Lookup","sdk-support":{"basic functionality":{js:"1.10.0"}}},case:{doc:"Selects the first output whose corresponding test condition evaluates to true, or the fallback value otherwise.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},match:{doc:'Selects the output for which the label value matches the input value, or the fallback value if no match is found. The input can be any expression (for example, `["get", "building_type"]`). Each label must be unique, and must be either:\n - a single literal value; or\n - an array of literal values, the values of which must be all strings or all numbers (for example `[100, 101]` or `["c", "b"]`).\n\nThe input matches if any of the values in the array matches using strict equality, similar to the `"in"` operator.\nIf the input type does not match the type of the labels, the result will be the fallback value.',group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},coalesce:{doc:"Evaluates each expression in turn until the first non-null value is obtained, and returns that value.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},step:{doc:'Produces discrete, stepped results by evaluating a piecewise-constant function defined by pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. Returns the output value of the stop just less than the input, or the first output if the input is less than the first stop.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},interpolate:{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). The `input` may be any numeric expression (e.g., `["get", "population"]`). Stop inputs must be numeric literals in strictly ascending order. The output type must be `number`, `array`, or `color`.\n\nInterpolation types:\n- `["linear"]`: Interpolates linearly between the pair of stops just less than and just greater than the input.\n- `["exponential", base]`: Interpolates exponentially between the stops just less than and just greater than the input. `base` controls the rate at which the output increases: higher values make the output increase more towards the high end of the range. With values close to 1 the output increases linearly.\n- `["cubic-bezier", x1, y1, x2, y2]`: Interpolates using the cubic bezier curve defined by the given control points.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"interpolate-hcl":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the Hue-Chroma-Luminance color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},"interpolate-lab":{doc:'Produces continuous, smooth results by interpolating between pairs of input and output values ("stops"). Works like `interpolate`, but the output type must be `color`, and the interpolation is performed in the CIELAB color space.',group:"Ramps, scales, curves","sdk-support":{"basic functionality":{js:"0.49.0"}}},ln2:{doc:"Returns mathematical constant ln(2).",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},pi:{doc:"Returns the mathematical constant pi.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},e:{doc:"Returns the mathematical constant e.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},typeof:{doc:"Returns a string describing the type of the given value.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},string:{doc:"Asserts that the input value is a string. If multiple values are provided, each one is evaluated in order until a string is obtained. If none of the inputs are strings, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},number:{doc:"Asserts that the input value is a number. If multiple values are provided, each one is evaluated in order until a number is obtained. If none of the inputs are numbers, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},boolean:{doc:"Asserts that the input value is a boolean. If multiple values are provided, each one is evaluated in order until a boolean is obtained. If none of the inputs are booleans, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},object:{doc:"Asserts that the input value is an object. If multiple values are provided, each one is evaluated in order until an object is obtained. If none of the inputs are objects, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},collator:{doc:"Returns a `collator` for use in locale-dependent comparison operations. The `case-sensitive` and `diacritic-sensitive` options default to `false`. The `locale` argument specifies the IETF language tag of the locale to use. If none is provided, the default locale is used. If the requested locale is not available, the `collator` will use a system-defined fallback locale. Use `resolved-locale` to test the results of locale fallback behavior.",group:"Types","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},format:{doc:'Returns a `formatted` string for displaying mixed-format text in the `text-field` property. The input may contain a string literal or expression, including an [`\'image\'`](#types-image) expression. Strings may be followed by a style override object that supports the following properties:\n- `"text-font"`: Overrides the font stack specified by the root layout property.\n- `"text-color"`: Overrides the color specified by the root paint property.\n- `"font-scale"`: Applies a scaling factor on `text-size` as specified by the root layout property.',group:"Types","sdk-support":{"basic functionality":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-font":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"font-scale":{js:"0.48.0",android:"6.7.0",ios:"4.6.0",macos:"0.12.0"},"text-color":{js:"1.3.0",android:"7.3.0",ios:"4.10.0",macos:"0.14.0"},image:{js:"1.6.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},image:{doc:"Returns an `image` type for use in `icon-image`, `*-pattern` entries and as a section in the `format` expression. If set, the `image` argument will check that the requested image exists in the style and will return either the resolved image name or `null`, depending on whether or not the image is currently in the style. This validation process is synchronous and requires the image to have been added to the style before requesting it in the `image` argument.",group:"Types","sdk-support":{"basic functionality":{js:"1.4.0",android:"8.6.0",ios:"5.7.0",macos:"0.15.0"}}},"number-format":{doc:"Converts the input number into a string representation using the providing formatting rules. If set, the `locale` argument specifies the locale to use, as a BCP 47 language tag. If set, the `currency` argument specifies an ISO 4217 code to use for currency-style formatting. If set, the `min-fraction-digits` and `max-fraction-digits` arguments specify the minimum and maximum number of fractional digits to include.",group:"Types","sdk-support":{"basic functionality":{js:"0.54.0"}}},"to-string":{doc:'Converts the input value to a string. If the input is `null`, the result is `""`. If the input is a boolean, the result is `"true"` or `"false"`. If the input is a number, it is converted to a string as specified by the ["NumberToString" algorithm](https://tc39.github.io/ecma262/#sec-tostring-applied-to-the-number-type) of the ECMAScript Language Specification. If the input is a color, it is converted to a string of the form `"rgba(r,g,b,a)"`, where `r`, `g`, and `b` are numerals ranging from 0 to 255, and `a` ranges from 0 to 1. Otherwise, the input is converted to a string in the format specified by the [`JSON.stringify`](https://tc39.github.io/ecma262/#sec-json.stringify) function of the ECMAScript Language Specification.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-number":{doc:'Converts the input value to a number, if possible. If the input is `null` or `false`, the result is 0. If the input is `true`, the result is 1. If the input is a string, it is converted to a number as specified by the ["ToNumber Applied to the String Type" algorithm](https://tc39.github.io/ecma262/#sec-tonumber-applied-to-the-string-type) of the ECMAScript Language Specification. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.',group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-boolean":{doc:"Converts the input value to a boolean. The result is `false` when then input is an empty string, 0, `false`, `null`, or `NaN`; otherwise it is `true`.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-rgba":{doc:"Returns a four-element array containing the input color's red, green, blue, and alpha components, in that order.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"to-color":{doc:"Converts the input value to a color. If multiple values are provided, each one is evaluated in order until the first successful conversion is obtained. If none of the inputs can be converted, the expression is an error.",group:"Types","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgb:{doc:"Creates a color value from red, green, and blue components, which must range between 0 and 255, and an alpha component of 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},rgba:{doc:"Creates a color value from red, green, blue components, which must range between 0 and 255, and an alpha component which must range between 0 and 1. If any component is out of range, the expression is an error.",group:"Color","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},get:{doc:"Retrieves a property value from the current feature's properties, or from another object if a second argument is provided. Returns null if the requested property is missing.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},has:{doc:"Tests for the presence of an property value in the current feature's properties, or from another object if a second argument is provided.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},length:{doc:"Gets the length of an array or string.",group:"Lookup","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},properties:{doc:'Gets the feature properties object. Note that in some cases, it may be more efficient to use ["get", "property_name"] directly.',group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"feature-state":{doc:"Retrieves a property value from the current feature's state. Returns null if the requested property is not present on the feature's state. A feature's state is not part of the GeoJSON or vector tile data, and must be set programmatically on each feature. Features are identified by their `id` attribute, which must be an integer or a string that can be cast to an integer. Note that [\"feature-state\"] can only be used with paint properties that support data-driven styling.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.46.0"}}},"geometry-type":{doc:"Gets the feature's geometry type: `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},id:{doc:"Gets the feature's id, if it has one.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},zoom:{doc:'Gets the current zoom level. Note that in style layout and paint properties, ["zoom"] may only appear as the input to a top-level "step" or "interpolate" expression.',group:"Zoom","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"heatmap-density":{doc:"Gets the kernel density estimation of a pixel in a heatmap layer, which is a relative measure of how many data points are crowded around a particular pixel. Can only be used in the `heatmap-color` property.",group:"Heatmap","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"line-progress":{doc:"Gets the progress along a gradient line. Can only be used in the `line-gradient` property.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.6.0",macos:"0.12.0"}}},"sky-radial-progress":{doc:"Gets the distance of a point on the sky from the sun position. Returns 0 at sun position and 1 when the distance reaches `sky-gradient-radius`. Can only be used in the `sky-gradient` property.",group:"sky","sdk-support":{"basic functionality":{js:"2.0.0"}}},accumulated:{doc:"Gets the value of a cluster property accumulated so far. Can only be used in the `clusterProperties` option of a clustered GeoJSON source.",group:"Feature data","sdk-support":{"basic functionality":{js:"0.53.0"}}},"+":{doc:"Returns the sum of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"*":{doc:"Returns the product of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"-":{doc:"For two inputs, returns the result of subtracting the second input from the first. For a single input, returns the result of subtracting it from 0.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"/":{doc:"Returns the result of floating point division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"%":{doc:"Returns the remainder after integer division of the first input by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"^":{doc:"Returns the result of raising the first input to the power specified by the second.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sqrt:{doc:"Returns the square root of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.42.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log10:{doc:"Returns the base-ten logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ln:{doc:"Returns the natural logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},log2:{doc:"Returns the base-two logarithm of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},sin:{doc:"Returns the sine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},cos:{doc:"Returns the cosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},tan:{doc:"Returns the tangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},asin:{doc:"Returns the arcsine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},acos:{doc:"Returns the arccosine of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},atan:{doc:"Returns the arctangent of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},min:{doc:"Returns the minimum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},max:{doc:"Returns the maximum value of the inputs.",group:"Math","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},round:{doc:'Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example, `["round", -1.5]` evaluates to -2.',group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},abs:{doc:"Returns the absolute value of the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},ceil:{doc:"Returns the smallest integer that is greater than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},floor:{doc:"Returns the largest integer that is less than or equal to the input.",group:"Math","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},distance:{doc:"Returns the shortest distance in meters between the evaluated feature and the input geometry. The input value can be a valid GeoJSON of type `Point`, `MultiPoint`, `LineString`, `MultiLineString`, `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Distance values returned may vary in precision due to loss in precision from encoding geometries, particularly below zoom level 13.",group:"Math","sdk-support":{"basic functionality":{android:"9.2.0",ios:"5.9.0",macos:"0.16.0"}}},"==":{doc:"Returns `true` if the input values are equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"!=":{doc:"Returns `true` if the input values are not equal, `false` otherwise. The comparison is strictly typed: values of different runtime types are always considered unequal. Cases where the types are known to be different at parse time are considered invalid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">":{doc:"Returns `true` if the first input is strictly greater than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<":{doc:"Returns `true` if the first input is strictly less than the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},">=":{doc:"Returns `true` if the first input is greater than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},"<=":{doc:"Returns `true` if the first input is less than or equal to the second, `false` otherwise. The arguments are required to be either both strings or both numbers; if during evaluation they are not, expression evaluation produces an error. Cases where this constraint is known not to hold at parse time are considered in valid and will produce a parse error. Accepts an optional `collator` argument to control locale-dependent string comparisons.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},collator:{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}},all:{doc:"Returns `true` if all the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `false`, the result is `false` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},any:{doc:"Returns `true` if any of the inputs are `true`, `false` otherwise. The inputs are evaluated in order, and evaluation is short-circuiting: once an input expression evaluates to `true`, the result is `true` and no further input expressions are evaluated.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"!":{doc:"Logical negation. Returns `true` if the input is `false`, and `false` if the input is `true`.",group:"Decision","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},within:{doc:"Returns `true` if the evaluated feature is fully contained inside a boundary of the input geometry, `false` otherwise. The input value can be a valid GeoJSON of type `Polygon`, `MultiPolygon`, `Feature`, or `FeatureCollection`. Supported features for evaluation:\n- `Point`: Returns `false` if a point is on the boundary or falls outside the boundary.\n- `LineString`: Returns `false` if any part of a line falls outside the boundary, the line intersects the boundary, or a line's endpoint is on the boundary.",group:"Decision","sdk-support":{"basic functionality":{js:"1.9.0",android:"9.1.0",ios:"5.8.0",macos:"0.15.0"}}},"is-supported-script":{doc:"Returns `true` if the input string is expected to render legibly. Returns `false` if the input string contains sections that cannot be rendered without potential loss of meaning (e.g. Indic scripts that require complex text shaping, or right-to-left scripts if the the `mapbox-gl-rtl-text` plugin is not in use in Mapbox GL JS).",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.6.0"}}},upcase:{doc:"Returns the input string converted to uppercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},downcase:{doc:"Returns the input string converted to lowercase. Follows the Unicode Default Case Conversion algorithm and the locale-insensitive case mappings in the Unicode Character Database.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},concat:{doc:"Returns a `string` consisting of the concatenation of the inputs. Each input is converted to a string as if by `to-string`.",group:"String","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}}},"resolved-locale":{doc:"Returns the IETF language tag of the locale being used by the provided `collator`. This can be used to determine the default system locale, or to determine if a requested locale was successfully loaded.",group:"String","sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.2.0",macos:"0.9.0"}}}}},fog:{range:{type:"array",default:[.5,10],minimum:-20,maximum:20,length:2,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"The start and end distance range in which fog fades from fully transparent to fully opaque. The distance to the point at the center of the map is defined as zero, so that negative range values are closer to the camera, and positive values are farther away.",example:[.5,10],"sdk-support":{"basic functionality":{js:"2.3.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"The color of the fog. Using opacity is recommended only for smoothly transitioning fog on/off as anything less than 100% opacity results in more tiles loaded and drawn.","sdk-support":{"basic functionality":{js:"2.3.0"}}},"horizon-blend":{type:"number","property-type":"data-constant",default:.1,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Horizon blend applies a smooth fade from the color of the fog to the color of the sky. A value of zero leaves a sharp transition from fog to sky. Increasing the value blends the color of fog into increasingly high angles of the sky.","sdk-support":{"basic functionality":{js:"2.3.0"}}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{doc:"The position of the light source is aligned to the rotation of the map."},viewport:{doc:"The position of the light source is aligned to the rotation of the viewport."}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]},doc:"Whether extruded geometries are lit relative to the map or viewport.",example:"map","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},doc:"Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below).",example:[1.5,90,80],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Color tint for lighting extruded geometries.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}}}},terrain:{source:{type:"string",doc:"Name of a source of `raster_dem` type to be used for terrain elevation.",required:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}}},exaggeration:{type:"number","property-type":"data-constant",default:1,minimum:0,maximum:1e3,expression:{interpolated:!0,parameters:["zoom"]},transition:!0,doc:"Exaggerates the elevation of the terrain by multiplying the data from the DEM with this value.","sdk-support":{"basic functionality":{js:"2.0.0"}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background","paint_sky"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,doc:"Whether or not the fill should be antialiased.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill layer. In contrast to the `fill-color`, this value will also affect the 1px stroke around the fill, if the stroke is used.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.21.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",doc:"The color of the filled part of this layer. This color can be specified as `rgba` with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.",transition:!0,requires:[{"!":"fill-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",doc:"The outline color of the fill. Matches the value of `fill-color` if unspecified.",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.19.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{doc:"The fill is translated relative to the map."},viewport:{doc:"The fill is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-translate`.",default:"map",requires:["fill-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",doc:"The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use `fill-extrusion-opacity` to set layer opacity.",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{doc:"The fill extrusion is translated relative to the map."},viewport:{doc:"The fill extrusion is translated relative to the viewport."}},doc:"Controls the frame of reference for `fill-extrusion-translate`.",default:"map",requires:["fill-extrusion-translate"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude this layer.",transition:!0,"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",doc:"The height with which to extrude the base of this layer. Must be less than or equal to `fill-extrusion-height`.",transition:!0,requires:["fill-extrusion-height"],"sdk-support":{"basic functionality":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"},"data-driven styling":{js:"0.27.0",android:"5.1.0",ios:"3.6.0",macos:"0.5.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,doc:"Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down.",transition:!1,"sdk-support":{"basic functionality":{js:"0.50.0",ios:"4.7.0",macos:"0.13.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",doc:"The opacity at which the line will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",doc:"The color with which the line will be drawn.",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.23.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{doc:"The line is translated relative to the map."},viewport:{doc:"The line is translated relative to the viewport."}},doc:"Controls the frame of reference for `line-translate`.",default:"map",requires:["line-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",doc:"Stroke thickness.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,doc:"Draws a line casing outside of a line's actual path. Value indicates the width of the inner gap.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,doc:"The line's offset. For linear features, a positive value offsets the line to the right, relative to the direction of the line, and a negative value to the left. For polygon features, a positive value results in an inset, and a negative value results in an outset.",transition:!0,units:"pixels","sdk-support":{"basic functionality":{js:"0.12.1",android:"3.0.0",ios:"3.1.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Blur applied to the line, in pixels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",doc:"Specifies the lengths of the alternating dashes and gaps that form the dash pattern. The lengths are later scaled by the line width. To convert a dash length to pixels, multiply the length by the current line width. Note that GeoJSON sources with `lineMetrics: true` specified won't render dashed lines to the expected scale. Also note that zoom-dependent expressions will be evaluated only at integer zoom levels.",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"2.3.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing image lines. For seamless patterns, image width must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.49.0",android:"6.5.0",macos:"0.11.0",ios:"4.4.0"}},expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",doc:'Defines a gradient with which to color a line feature. Can only be used with GeoJSON sources that specify `"lineMetrics": true`.',transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],"sdk-support":{"basic functionality":{js:"0.45.0",android:"6.5.0",ios:"4.4.0",macos:"0.11.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",doc:"Circle radius.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",doc:"The fill color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.18.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,doc:"Amount to blur the circle. 1 blurs the circle such that only the centerpoint is full opacity.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",doc:"The opacity at which the circle will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.20.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"The geometry's offset. Values are [x, y] where negatives indicate left and up, respectively.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{doc:"The circle is translated relative to the map."},viewport:{doc:"The circle is translated relative to the viewport."}},doc:"Controls the frame of reference for `circle-translate`.",default:"map",requires:["circle-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{doc:"Circles are scaled according to their apparent distance to the camera."},viewport:{doc:"Circles are not scaled."}},default:"map",doc:"Controls the scaling behavior of the circle when the map is pitched.","sdk-support":{"basic functionality":{js:"0.21.0",android:"4.2.0",ios:"3.4.0",macos:"0.2.1"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{doc:"The circle is aligned to the plane of the map."},viewport:{doc:"The circle is aligned to the plane of the viewport."}},default:"viewport",doc:"Orientation of circle when map is pitched.","sdk-support":{"basic functionality":{js:"0.39.0",android:"5.2.0",ios:"3.7.0",macos:"0.6.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The width of the circle's stroke. Strokes are placed outside of the `circle-radius`.","sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",doc:"The stroke color of the circle.",transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",doc:"The opacity of the circle's stroke.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"},"data-driven styling":{js:"0.29.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",doc:"Radius of influence of one heatmap point in pixels. Increasing the value makes the heatmap smoother, but less detailed.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,doc:"A measure of how much an individual point contributes to the heatmap. A value of 10 would be equivalent to having 10 points of weight 1 in the same spot. Especially useful when combined with clustering.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,doc:"Similar to `heatmap-weight` but controls the intensity of the heatmap globally. Primarily used for adjusting the heatmap based on zoom level.","sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],doc:'Defines the color of each pixel based on its density value in a heatmap. Should be an expression that uses `["heatmap-density"]` as input.',transition:!1,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",doc:"The global opacity at which the heatmap layer will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.41.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{doc:"The opacity at which the icon will be drawn.",type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,doc:"The color of the icon. This can only be used with sdf icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the icon's halo. Icon halos can only be used with SDF icons.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the icon outline.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Fade out the halo towards the outside.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the icon's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["icon-image"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{doc:"Icons are translated relative to the map."},viewport:{doc:"Icons are translated relative to the viewport."}},doc:"Controls the frame of reference for `icon-translate`.",default:"map",requires:["icon-image","icon-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",doc:"The opacity at which the text will be drawn.",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",doc:"The color with which the text will be drawn.",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,doc:"The color of the text's halo, which helps it stand out from backgrounds.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"Distance of halo to the font outline. Max text halo width is 1/4 of the font-size.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",doc:"The halo's fadeout distance towards the outside.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{js:"0.33.0",android:"5.0.0",ios:"3.5.0",macos:"0.4.0"}},expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",doc:"Distance that the text's anchor is moved from its original placement. Positive values indicate right and down, while negative values indicate left and up.",requires:["text-field"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{doc:"The text is translated relative to the map."},viewport:{doc:"The text is translated relative to the viewport."}},doc:"Controls the frame of reference for `text-translate`.",default:"map",requires:["text-field","text-translate"],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",doc:"The opacity at which the image will be drawn.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",doc:"Rotates hues around the color wheel.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the minimum brightness.",default:0,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",doc:"Increase or reduce the brightness of the image. The value is the maximum brightness.",default:1,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",doc:"Increase or reduce the saturation of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",doc:"Increase or reduce the contrast of the image.",default:0,minimum:-1,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",doc:"The resampling/interpolation method to use for overscaling, also known as texture magnification filter",values:{linear:{doc:"(Bi)linear filtering interpolates pixel values using the weighted average of the four closest original source pixels creating a smooth but blurry look when overscaled"},nearest:{doc:"Nearest neighbor filtering interpolates pixel values using the nearest original source pixel creating a sharp but pixelated look when overscaled"}},default:"linear","sdk-support":{"basic functionality":{js:"0.47.0",android:"6.3.0",ios:"4.2.0",macos:"0.9.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",doc:"Fade duration when a new tile is added.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,doc:"The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshade-illumination-anchor` is set to `viewport` and due north if `hillshade-illumination-anchor` is set to `map`.",transition:!1,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{doc:"The hillshade illumination is relative to the north direction."},viewport:{doc:"The hillshade illumination is relative to the top of the viewport."}},default:"viewport",doc:"Direction of light source when map is rotated.","sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",doc:"Intensity of the hillshade",default:.5,minimum:0,maximum:1,transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",doc:"The shading color of areas that face away from the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",doc:"The shading color of areas that faces towards the light source.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",doc:"The shading color used to accentuate rugged terrain like sharp cliffs and gorges.",transition:!0,"sdk-support":{"basic functionality":{js:"0.43.0",android:"6.0.0",ios:"4.0.0",macos:"0.7.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",doc:"The color with which the background will be drawn.",transition:!0,requires:[{"!":"background-pattern"}],"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,doc:"Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels.","sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"},"data-driven styling":{}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity at which the background will be drawn.",transition:!0,"sdk-support":{"basic functionality":{js:"0.10.0",android:"2.0.1",ios:"2.0.0",macos:"0.1.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_sky:{"sky-type":{type:"enum",values:{gradient:{doc:"Renders the sky with a gradient that can be configured with `sky-gradient-radius` and `sky-gradient`."},atmosphere:{doc:"Renders the sky with a simulated atmospheric scattering algorithm, the sun direction can be attached to the light position or explicitly set through `sky-atmosphere-sun`."}},default:"atmosphere",doc:"The type of the sky","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun":{type:"array",value:"number",length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the sun center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the sun relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the sun, where 0° is directly above, at zenith, and 90° at the horizon. When this property is ommitted, the sun center is directly inherited from the light position.","sdk-support":{"basic functionality":{js:"2.0.0"}},requires:[{"sky-type":"atmosphere"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-atmosphere-sun-intensity":{type:"number",requires:[{"sky-type":"atmosphere"}],default:10,minimum:0,maximum:100,transition:!1,doc:"Intensity of the sun as a light source in the atmosphere (on a scale from 0 to a 100). Setting higher values will brighten up the sky.","sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-gradient-center":{type:"array",requires:[{"sky-type":"gradient"}],value:"number",default:[0,0],length:2,units:"degrees",minimum:[0,0],maximum:[360,180],transition:!1,doc:"Position of the gradient center [a azimuthal angle, p polar angle]. The azimuthal angle indicates the position of the gradient center relative to 0° north, where degrees proceed clockwise. The polar angle indicates the height of the gradient center, where 0° is directly above, at zenith, and 90° at the horizon.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient-radius":{type:"number",requires:[{"sky-type":"gradient"}],default:90,minimum:0,maximum:180,transition:!1,doc:"The angular distance (measured in degrees) from `sky-gradient-center` up to which the gradient extends. A value of 180 causes the gradient to wrap around to the opposite direction from `sky-gradient-center`.","sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"sky-gradient":{type:"color",default:["interpolate",["linear"],["sky-radial-progress"],.8,"#87ceeb",1,"white"],doc:"Defines a radial color gradient with which to color the sky. The color values can be interpolated with an expression using `sky-radial-progress`. The range [0, 1] for the interpolant covers a radial distance (in degrees) of [0, `sky-gradient-radius`] centered at the position specified by `sky-gradient-center`.",transition:!1,requires:[{"sky-type":"gradient"}],"sdk-support":{"basic functionality":{js:"2.0.0"},"data-driven styling":{}},expression:{interpolated:!0,parameters:["sky-radial-progress"]},"property-type":"color-ramp"},"sky-atmosphere-halo-color":{type:"color",default:"white",doc:"A color applied to the atmosphere sun halo. The alpha channel describes how strongly the sun halo is represented in an atmosphere sky layer.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-atmosphere-color":{type:"color",default:"white",doc:"A color used to tweak the main atmospheric scattering coefficients. Using white applies the default coefficients giving the natural blue color to the atmosphere. This color affects how heavily the corresponding wavelength is represented during scattering. The alpha channel describes the density of the atmosphere, with 1 maximum density and 0 no density.",transition:!1,requires:[{"sky-type":"atmosphere"}],"sdk-support":{"basic functionality":{js:"2.0.0"}},"property-type":"data-constant"},"sky-opacity":{type:"number",default:1,minimum:0,maximum:1,doc:"The opacity of the entire sky layer.",transition:!0,"sdk-support":{"basic functionality":{js:"2.0.0"}},expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds",doc:"Time allotted for transitions to complete."},delay:{type:"number",default:0,minimum:0,units:"milliseconds",doc:"Length of time before a transition begins."}},"property-type":{"data-driven":{type:"property-type",doc:"Property is interpolable and can be represented using a property expression."},"cross-faded":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms."},"cross-faded-data-driven":{type:"property-type",doc:"Property is non-interpolable; rather, its values will be cross-faded to smoothly transition between integer zooms. It can be represented using a property expression."},"color-ramp":{type:"property-type",doc:"Property should be specified using a color ramp from which the output color can be sampled based on a property calculation."},"data-constant":{type:"property-type",doc:"Property is interpolable but cannot be represented using a property expression."},constant:{type:"property-type",doc:"Property is constant across all zoom levels and property values."}},promoteId:{"*":{type:"string",doc:"A name of a feature property to use as ID for feature state."}}};var k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function S(t){var i={exports:{}};return t(i,i.exports),i.exports} /*! https://mths.be/punycode v1.3.2 by @mathias */ var E=S((function(t,i){!function(e){var n=i&&!i.nodeType&&i,r=t&&!t.nodeType&&t,s="object"==typeof k&&k;s.global!==s&&s.window!==s&&s.self!==s||(e=s);var o,a,u=2147483647,h=36,f=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},v=Math.floor,p=String.fromCharCode;function m(t){throw RangeError(d[t])}function y(t,i){for(var e=t.length,n=[];e--;)n[e]=i(t[e]);return n}function g(t,i){var e=t.split("@"),n="";return e.length>1&&(n=e[0]+"@",t=e[1]),n+y((t=t.replace(l,".")).split("."),i).join(".")}function b(t){for(var i,e,n=[],r=0,s=t.length;r=55296&&i<=56319&&r65535&&(i+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=p(t)})).join("")}function M(t,i){return t+22+75*(t<26)-((0!=i)<<5)}function x(t,i,e){var n=0;for(t=e?v(t/700):t>>1,t+=v(t/i);t>455;n+=h)t=v(t/35);return v(n+36*t/(t+38))}function S(t){var i,e,n,r,s,o,a,f,c,l,d,p=[],y=t.length,g=0,b=128,M=72;for((e=t.lastIndexOf("-"))<0&&(e=0),n=0;n=128&&m("not-basic"),p.push(t.charCodeAt(n));for(r=e>0?e+1:0;r=y&&m("invalid-input"),((f=(d=t.charCodeAt(r++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:h)>=h||f>v((u-g)/o))&&m("overflow"),g+=f*o,!(f<(c=a<=M?1:a>=M+26?26:a-M));a+=h)o>v(u/(l=h-c))&&m("overflow"),o*=l;M=x(g-s,i=p.length+1,0==s),v(g/i)>u-b&&m("overflow"),b+=v(g/i),g%=i,p.splice(g++,0,b)}return w(p)}function E(t){var i,e,n,r,s,o,a,f,c,l,d,y,g,w,k,S=[];for(y=(t=b(t)).length,i=128,e=0,s=72,o=0;o=i&&dv((u-e)/(g=n+1))&&m("overflow"),e+=(a-i)*g,i=a,o=0;ou&&m("overflow"),d==i){for(f=e,c=h;!(f<(l=c<=s?1:c>=s+26?26:c-s));c+=h)k=f-l,w=h-l,S.push(p(M(l+k%w,0))),f=v(k/w);S.push(p(M(f,0))),s=x(e,g,n==r),e=0,++n}++e,++i}return S.join("")}if(o={version:"1.3.2",ucs2:{decode:b,encode:w},decode:S,encode:E,toASCII:function(t){return g(t,(function(t){return c.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return g(t,(function(t){return f.test(t)?S(t.slice(4).toLowerCase()):t}))}},n&&r)if(t.exports==n)r.exports=o;else for(a in o)o.hasOwnProperty(a)&&(n[a]=o[a]);else e.punycode=o}(k)})),T=function(t){return"string"==typeof t},_=function(t){return"object"==typeof t&&null!==t},A=function(t){return null===t},O=function(t){return null==t};function j(t,i){return Object.prototype.hasOwnProperty.call(t,i)}var C=function(t,i,e,n){i=i||"&",e=e||"=";var r={};if("string"!=typeof t||0===t.length)return r;var s=/\+/g;t=t.split(i);var o=1e3;n&&"number"==typeof n.maxKeys&&(o=n.maxKeys);var a=t.length;o>0&&a>o&&(a=o);for(var u=0;u=0?(h=d.substr(0,v),f=d.substr(v+1)):(h=d,f=""),c=decodeURIComponent(h),l=decodeURIComponent(f),j(r,c)?Array.isArray(r[c])?r[c].push(l):r[c]=[r[c],l]:r[c]=l}return r},I=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}},R=function(t,i,e,n){return i=i||"&",e=e||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var r=encodeURIComponent(I(n))+e;return Array.isArray(t[n])?t[n].map((function(t){return r+encodeURIComponent(I(t))})).join(i):r+encodeURIComponent(I(t[n]))})).join(i):n?encodeURIComponent(I(n))+e+encodeURIComponent(I(t)):""},P=S((function(t,i){i.decode=i.parse=C,i.encode=i.stringify=R}));function N(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var D=/^([a-z0-9.+-]+:)/i,L=/:[0-9]*$/,F=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,z=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),U=["'"].concat(z),G=["%","/","?",";","#"].concat(U),B=["/","?","#"],q=/^[+a-z0-9A-Z_-]{0,63}$/,V=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Z={javascript:!0,"javascript:":!0},$={javascript:!0,"javascript:":!0},W={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function H(t,i,e){if(t&&_(t)&&t instanceof N)return t;var n=new N;return n.parse(t,i,e),n}N.prototype.parse=function(t,i,e){if(!T(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var n=t.indexOf("?"),r=-1!==n&&n127?w+="x":w+=b[M];if(!w.match(q)){var k=y.slice(0,v),S=y.slice(v+1),_=b.match(V);_&&(k.push(_[1]),S.unshift(_[2])),S.length&&(o="/"+S.join(".")+o),this.hostname=k.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),m||(this.hostname=E.toASCII(this.hostname));var A=this.port?":"+this.port:"",O=this.hostname||"";this.host=O+A,this.href+=this.host,m&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==o[0]&&(o="/"+o))}if(!Z[h])for(v=0,g=U.length;v0)&&e.host.split("@"))&&(e.auth=E.shift(),e.host=e.hostname=E.shift());return e.search=t.search,e.query=t.query,A(e.pathname)&&A(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=e.format(),e}if(!b.length)return e.pathname=null,e.search?e.path="/"+e.search:e.path=null,e.href=e.format(),e;for(var M=b.slice(-1)[0],x=(e.host||t.host||b.length>1)&&("."===M||".."===M)||""===M,k=0,S=b.length;S>=0;S--)"."===(M=b[S])?b.splice(S,1):".."===M?(b.splice(S,1),k++):k&&(b.splice(S,1),k--);if(!y&&!g)for(;k--;k)b.unshift("..");!y||""===b[0]||b[0]&&"/"===b[0].charAt(0)||b.unshift(""),x&&"/"!==b.join("/").substr(-1)&&b.push("");var E,_=""===b[0]||b[0]&&"/"===b[0].charAt(0);w&&(e.hostname=e.host=_?"":b.length?b.shift():"",(E=!!(e.host&&e.host.indexOf("@")>0)&&e.host.split("@"))&&(e.auth=E.shift(),e.host=e.hostname=E.shift()));return(y=y||e.host&&b.length)&&!_&&b.unshift(""),b.length?e.pathname=b.join("/"):(e.pathname=null,e.path=null),A(e.pathname)&&A(e.search)||(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.auth=t.auth||e.auth,e.slashes=e.slashes||t.slashes,e.href=e.format(),e},N.prototype.parseHost=function(){var t=this.host,i=L.exec(t);i&&(":"!==(i=i[0])&&(this.port=i.substr(1)),t=t.substr(0,t.length-i.length)),t&&(this.hostname=t)};function K(t){for(var i=[],e=arguments.length-1;e-- >0;)i[e]=arguments[e+1];for(var n=0,r=i;n":"value"===t.itemType.kind?"array":"array<"+i+">"}return t.kind}var ft=[J,Q,tt,it,et,ot,nt,ut(rt),at];function ct(t,i){if("error"===i.kind)return null;if("array"===t.kind){if("array"===i.kind&&(0===i.N&&"value"===i.itemType.kind||!ct(t.itemType,i.itemType))&&("number"!=typeof t.N||t.N===i.N))return null}else{if(t.kind===i.kind)return null;if("value"===t.kind)for(var e=0,n=ft;e255?255:t}function r(t){return t<0?0:t>1?1:t}function s(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return"%"===t[t.length-1]?r(parseFloat(t)/100):r(parseFloat(t))}function a(t,i,e){return e<0?e+=1:e>1&&(e-=1),6*e<1?t+(i-t)*e*6:2*e<1?i:3*e<2?t+(i-t)*(2/3-e)*6:t}try{i.parseCSSColor=function(t){var i,r=t.replace(/ /g,"").toLowerCase();if(r in e)return e[r].slice();if("#"===r[0])return 4===r.length?(i=parseInt(r.substr(1),16))>=0&&i<=4095?[(3840&i)>>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1]:null:7===r.length&&(i=parseInt(r.substr(1),16))>=0&&i<=16777215?[(16711680&i)>>16,(65280&i)>>8,255&i,1]:null;var u=r.indexOf("("),h=r.indexOf(")");if(-1!==u&&h+1===r.length){var f=r.substr(0,u),c=r.substr(u+1,h-(u+1)).split(","),l=1;switch(f){case"rgba":if(4!==c.length)return null;l=o(c.pop());case"rgb":return 3!==c.length?null:[s(c[0]),s(c[1]),s(c[2]),l];case"hsla":if(4!==c.length)return null;l=o(c.pop());case"hsl":if(3!==c.length)return null;var d=(parseFloat(c[0])%360+360)%360/360,v=o(c[1]),p=o(c[2]),m=p<=.5?p*(v+1):p+v-p*v,y=2*p-m;return[n(255*a(y,m,d+1/3)),n(255*a(y,m,d)),n(255*a(y,m,d-1/3)),l];default:return null}}return null}}catch(t){}})),pt=function(t,i,e,n){void 0===n&&(n=1),this.r=t,this.g=i,this.b=e,this.a=n};pt.parse=function(t){if(t){if(t instanceof pt)return t;if("string"==typeof t){var i=vt.parseCSSColor(t);if(i)return new pt(i[0]/255*i[3],i[1]/255*i[3],i[2]/255*i[3],i[3])}}},pt.prototype.toString=function(){var t=this.toArray(),i=t[0],e=t[1],n=t[2],r=t[3];return"rgba("+Math.round(i)+","+Math.round(e)+","+Math.round(n)+","+r+")"},pt.prototype.toArray=function(){var t=this,i=t.r,e=t.g,n=t.b,r=t.a;return 0===r?[0,0,0,0]:[255*i/r,255*e/r,255*n/r,r]},pt.black=new pt(0,0,0,1),pt.white=new pt(1,1,1,1),pt.transparent=new pt(0,0,0,0),pt.red=new pt(1,0,0,1),pt.blue=new pt(0,0,1,1);var mt=function(t,i,e){this.sensitivity=t?i?"variant":"case":i?"accent":"base",this.locale=e,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};mt.prototype.compare=function(t,i){return this.collator.compare(t,i)},mt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var yt=function(t,i,e,n,r){this.text=t,this.image=i,this.scale=e,this.fontStack=n,this.textColor=r},gt=function(t){this.sections=t};gt.fromString=function(t){return new gt([new yt(t,null,null,null,null)])},gt.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},gt.factory=function(t){return t instanceof gt?t:gt.fromString(t)},gt.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},gt.prototype.serialize=function(){for(var t=["format"],i=0,e=this.sections;i=0&&t<=255&&"number"==typeof i&&i>=0&&i<=255&&"number"==typeof e&&e>=0&&e<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,i,e,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,i,e,n]:[t,i,e]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Mt(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof pt)return!0;if(t instanceof mt)return!0;if(t instanceof gt)return!0;if(t instanceof bt)return!0;if(Array.isArray(t)){for(var i=0,e=t;i2){var a=t[1];if("string"!=typeof a||!(a in Tt)||"object"===a)return i.error('The item type argument of "array" must be one of string, number, boolean',1);s=Tt[a],n++}else s=rt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return i.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}e=ut(s,o)}else e=Tt[r];for(var u=[];n1)&&i.push(n)}}return i.concat(this.args.map((function(t){return t.serialize()})))};var At=function(t){this.type=ot,this.sections=t};At.parse=function(t,i){if(t.length<2)return i.error("Expected at least one argument.");var e=t[1];if(!Array.isArray(e)&&"object"==typeof e)return i.error("First argument must be an image or text section.");for(var n=[],r=!1,s=1;s<=t.length-1;++s){var o=t[s];if(r&&"object"==typeof o&&!Array.isArray(o)){r=!1;var a=null;if(o["font-scale"]&&!(a=i.parse(o["font-scale"],1,Q)))return null;var u=null;if(o["text-font"]&&!(u=i.parse(o["text-font"],1,ut(tt))))return null;var h=null;if(o["text-color"]&&!(h=i.parse(o["text-color"],1,et)))return null;var f=n[n.length-1];f.scale=a,f.font=u,f.textColor=h}else{var c=i.parse(t[s],1,rt);if(!c)return null;var l=c.type.kind;if("string"!==l&&"value"!==l&&"null"!==l&&"resolvedImage"!==l)return i.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");r=!0,n.push({content:c,scale:null,font:null,textColor:null})}}return new At(n)},At.prototype.evaluate=function(t){return new gt(this.sections.map((function(i){var e=i.content.evaluate(t);return xt(e)===at?new yt("",e,null,null,null):new yt(kt(e),null,i.scale?i.scale.evaluate(t):null,i.font?i.font.evaluate(t).join(","):null,i.textColor?i.textColor.evaluate(t):null)})))},At.prototype.eachChild=function(t){for(var i=0,e=this.sections;i-1),e},Ot.prototype.eachChild=function(t){t(this.input)},Ot.prototype.outputDefined=function(){return!1},Ot.prototype.serialize=function(){return["image",this.input.serialize()]};var jt={"to-boolean":it,"to-color":et,"to-number":Q,"to-string":tt},Ct=function(t,i){this.type=t,this.args=i};Ct.parse=function(t,i){if(t.length<2)return i.error("Expected at least one argument.");var e=t[0];if(("to-boolean"===e||"to-string"===e)&&2!==t.length)return i.error("Expected one argument.");for(var n=jt[e],r=[],s=1;s4?"Invalid rbga value "+JSON.stringify(i)+": expected an array containing either three or four numeric values.":wt(i[0],i[1],i[2],i[3])))return new pt(i[0]/255,i[1]/255,i[2]/255,i[3])}throw new Et(e||"Could not parse color from value '"+("string"==typeof i?i:String(JSON.stringify(i)))+"'")}if("number"===this.type.kind){for(var o=null,a=0,u=this.args;a=i[2])&&(!(t[1]<=i[1])&&!(t[3]>=i[3])))}function zt(t,i){var e,n=(180+t[0])/360,r=(e=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360),s=Math.pow(2,i.z);return[Math.round(n*s*Dt),Math.round(r*s*Dt)]}function Ut(t,i,e){return i[1]>t[1]!=e[1]>t[1]&&t[0]<(e[0]-i[0])*(t[1]-i[1])/(e[1]-i[1])+i[0]}function Gt(t,i){for(var e,n,r,s,o,a,u,h=!1,f=0,c=i.length;f0&&c<0||f<0&&c>0}function Vt(t,i,e){for(var n=0,r=e;ne[2]){var r=.5*n,s=t[0]-e[0]>r?-n:e[0]-t[0]>r?n:0;0===s&&(s=t[0]-e[2]>r?-n:e[2]-t[0]>r?n:0),t[0]+=s}Lt(i,t)}function Yt(t,i,e,n){for(var r=Math.pow(2,n.z)*Dt,s=[n.x*Dt,n.y*Dt],o=[],a=0,u=t;a=0)return!1;var e=!0;return t.eachChild((function(t){e&&!ii(t,i)&&(e=!1)})),e}Jt.parse=function(t,i){if(2!==t.length)return i.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(Mt(t[1])){var e=t[1];if("FeatureCollection"===e.type)for(var n=0;ni))throw new Et("Input is not a number.");o=a-1}return 0}ni.prototype.parse=function(t,i,e,n,r){return void 0===r&&(r={}),i?this.concat(i,e,n)._parse(t,r):this._parse(t,r)},ni.prototype._parse=function(t,i){function e(t,i,e){return"assert"===e?new _t(i,[t]):"coerce"===e?new Ct(i,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var r=this.registry[n];if(r){var s=r.parse(t,this);if(!s)return null;if(this.expectedType){var o=this.expectedType,a=s.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==a.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==a.kind&&"string"!==a.kind){if(this.checkSubtype(o,a))return null}else s=e(s,o,i.typeAnnotation||"coerce");else s=e(s,o,i.typeAnnotation||"assert")}if(!(s instanceof St)&&"resolvedImage"!==s.type.kind&&ri(s)){var u=new Rt;try{s=new St(s.type,s.evaluate(u))}catch(t){return this.error(t.message),null}}return s}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},ni.prototype.concat=function(t,i,e){var n="number"==typeof t?this.path.concat(t):this.path,r=e?this.scope.concat(e):this.scope;return new ni(this.registry,n,i||null,r,this.errors)},ni.prototype.error=function(t){for(var i=[],e=arguments.length-1;e-- >0;)i[e]=arguments[e+1];var n=""+this.key+i.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Y(n,t))},ni.prototype.checkSubtype=function(t,i){var e=ct(t,i);return e&&this.error(e),e};var oi=function(t,i,e){this.type=t,this.input=i,this.labels=[],this.outputs=[];for(var n=0,r=e;n=o)return i.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',u);var f=i.parse(a,h,r);if(!f)return null;r=r||f.type,n.push([o,f])}return new oi(r,e,n)},oi.prototype.evaluate=function(t){var i=this.labels,e=this.outputs;if(1===i.length)return e[0].evaluate(t);var n=this.input.evaluate(t);if(n<=i[0])return e[0].evaluate(t);var r=i.length;return n>=i[r-1]?e[r-1].evaluate(t):e[si(i,n)].evaluate(t)},oi.prototype.eachChild=function(t){t(this.input);for(var i=0,e=this.outputs;i0&&t.push(this.labels[i]),t.push(this.outputs[i].serialize());return t};var ai=ui;function ui(t,i,e,n){this.cx=3*t,this.bx=3*(e-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*i,this.by=3*(n-i)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=e,this.p2y=n}function hi(t,i,e){return t*(1-e)+i*e}ui.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},ui.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},ui.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},ui.prototype.solveCurveX=function(t,i){var e,n,r,s,o;for(void 0===i&&(i=1e-6),r=t,o=0;o<8;o++){if(s=this.sampleCurveX(r)-t,Math.abs(s)(n=1))return n;for(;es?e=r:n=r,r=.5*(n-e)+e}return r},ui.prototype.solve=function(t,i){return this.sampleCurveY(this.solveCurveX(t,i))};var fi=Object.freeze({__proto__:null,number:hi,color:function(t,i,e){return new pt(hi(t.r,i.r,e),hi(t.g,i.g,e),hi(t.b,i.b,e),hi(t.a,i.a,e))},array:function(t,i,e){return t.map((function(t,n){return hi(t,i[n],e)}))}}),ci=.95047,li=1.08883,di=4/29,vi=6/29,pi=3*vi*vi,mi=Math.PI/180,yi=180/Math.PI;function gi(t){return t>.008856451679035631?Math.pow(t,1/3):t/pi+di}function bi(t){return t>vi?t*t*t:pi*(t-di)}function wi(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Mi(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xi(t){var i=Mi(t.r),e=Mi(t.g),n=Mi(t.b),r=gi((.4124564*i+.3575761*e+.1804375*n)/ci),s=gi((.2126729*i+.7151522*e+.072175*n)/1);return{l:116*s-16,a:500*(r-s),b:200*(s-gi((.0193339*i+.119192*e+.9503041*n)/li)),alpha:t.a}}function ki(t){var i=(t.l+16)/116,e=isNaN(t.a)?i:i+t.a/500,n=isNaN(t.b)?i:i-t.b/200;return i=1*bi(i),e=ci*bi(e),n=li*bi(n),new pt(wi(3.2404542*e-1.5371385*i-.4985314*n),wi(-.969266*e+1.8760108*i+.041556*n),wi(.0556434*e-.2040259*i+1.0572252*n),t.alpha)}function Si(t,i,e){var n=i-t;return t+e*(n>180||n<-180?n-360*Math.round(n/360):n)}var Ei={forward:xi,reverse:ki,interpolate:function(t,i,e){return{l:hi(t.l,i.l,e),a:hi(t.a,i.a,e),b:hi(t.b,i.b,e),alpha:hi(t.alpha,i.alpha,e)}}},Ti={forward:function(t){var i=xi(t),e=i.l,n=i.a,r=i.b,s=Math.atan2(r,n)*yi;return{h:s<0?s+360:s,c:Math.sqrt(n*n+r*r),l:e,alpha:t.a}},reverse:function(t){var i=t.h*mi,e=t.c;return ki({l:t.l,a:Math.cos(i)*e,b:Math.sin(i)*e,alpha:t.alpha})},interpolate:function(t,i,e){return{h:Si(t.h,i.h,e),c:hi(t.c,i.c,e),l:hi(t.l,i.l,e),alpha:hi(t.alpha,i.alpha,e)}}},_i=Object.freeze({__proto__:null,lab:Ei,hcl:Ti}),Ai=function(t,i,e,n,r){this.type=t,this.operator=i,this.interpolation=e,this.input=n,this.labels=[],this.outputs=[];for(var s=0,o=r;s1})))return i.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:a}}if(t.length-1<4)return i.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return i.error("Expected an even number of arguments.");if(!(r=i.parse(r,2,Q)))return null;var u=[],h=null;"interpolate-hcl"===e||"interpolate-lab"===e?h=et:i.expectedType&&"value"!==i.expectedType.kind&&(h=i.expectedType);for(var f=0;f=c)return i.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',d);var p=i.parse(l,v,h);if(!p)return null;h=h||p.type,u.push([c,p])}return"number"===h.kind||"color"===h.kind||"array"===h.kind&&"number"===h.itemType.kind&&"number"==typeof h.N?new Ai(h,e,n,r,u):i.error("Type "+ht(h)+" is not interpolatable.")},Ai.prototype.evaluate=function(t){var i=this.labels,e=this.outputs;if(1===i.length)return e[0].evaluate(t);var n=this.input.evaluate(t);if(n<=i[0])return e[0].evaluate(t);var r=i.length;if(n>=i[r-1])return e[r-1].evaluate(t);var s=si(i,n),o=i[s],a=i[s+1],u=Ai.interpolationFactor(this.interpolation,n,o,a),h=e[s].evaluate(t),f=e[s+1].evaluate(t);return"interpolate"===this.operator?fi[this.type.kind.toLowerCase()](h,f,u):"interpolate-hcl"===this.operator?Ti.reverse(Ti.interpolate(Ti.forward(h),Ti.forward(f),u)):Ei.reverse(Ei.interpolate(Ei.forward(h),Ei.forward(f),u))},Ai.prototype.eachChild=function(t){t(this.input);for(var i=0,e=this.outputs;i=e.length)throw new Et("Array index out of bounds: "+i+" > "+(e.length-1)+".");if(i!==Math.floor(i))throw new Et("Array index must be an integer, but found "+i+" instead.");return e[i]},Ii.prototype.eachChild=function(t){t(this.index),t(this.input)},Ii.prototype.outputDefined=function(){return!1},Ii.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Ri=function(t,i){this.type=it,this.needle=t,this.haystack=i};Ri.parse=function(t,i){if(3!==t.length)return i.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var e=i.parse(t[1],1,rt),n=i.parse(t[2],2,rt);return e&&n?lt(e.type,[it,tt,Q,J,rt])?new Ri(e,n):i.error("Expected first argument to be of type boolean, string, number or null, but found "+ht(e.type)+" instead"):null},Ri.prototype.evaluate=function(t){var i=this.needle.evaluate(t),e=this.haystack.evaluate(t);if(!e)return!1;if(!dt(i,["boolean","string","number","null"]))throw new Et("Expected first argument to be of type boolean, string, number or null, but found "+ht(xt(i))+" instead.");if(!dt(e,["string","array"]))throw new Et("Expected second argument to be of type array or string, but found "+ht(xt(e))+" instead.");return e.indexOf(i)>=0},Ri.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},Ri.prototype.outputDefined=function(){return!0},Ri.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Pi=function(t,i,e){this.type=Q,this.needle=t,this.haystack=i,this.fromIndex=e};Pi.parse=function(t,i){if(t.length<=2||t.length>=5)return i.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var e=i.parse(t[1],1,rt),n=i.parse(t[2],2,rt);if(!e||!n)return null;if(!lt(e.type,[it,tt,Q,J,rt]))return i.error("Expected first argument to be of type boolean, string, number or null, but found "+ht(e.type)+" instead");if(4===t.length){var r=i.parse(t[3],3,Q);return r?new Pi(e,n,r):null}return new Pi(e,n)},Pi.prototype.evaluate=function(t){var i=this.needle.evaluate(t),e=this.haystack.evaluate(t);if(!dt(i,["boolean","string","number","null"]))throw new Et("Expected first argument to be of type boolean, string, number or null, but found "+ht(xt(i))+" instead.");if(!dt(e,["string","array"]))throw new Et("Expected second argument to be of type array or string, but found "+ht(xt(e))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return e.indexOf(i,n)}return e.indexOf(i)},Pi.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},Pi.prototype.outputDefined=function(){return!1},Pi.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ni=function(t,i,e,n,r,s){this.inputType=t,this.type=i,this.input=e,this.cases=n,this.outputs=r,this.otherwise=s};Ni.parse=function(t,i){if(t.length<5)return i.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return i.error("Expected an even number of arguments.");var e,n;i.expectedType&&"value"!==i.expectedType.kind&&(n=i.expectedType);for(var r={},s=[],o=2;oNumber.MAX_SAFE_INTEGER)return h.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof l&&Math.floor(l)!==l)return h.error("Numeric branch labels must be integer values.");if(e){if(h.checkSubtype(e,xt(l)))return null}else e=xt(l);if(void 0!==r[String(l)])return h.error("Branch labels must be unique.");r[String(l)]=s.length}var d=i.parse(u,o,n);if(!d)return null;n=n||d.type,s.push(d)}var v=i.parse(t[1],1,rt);if(!v)return null;var p=i.parse(t[t.length-1],t.length-1,n);return p?"value"!==v.type.kind&&i.concat(1).checkSubtype(e,v.type)?null:new Ni(e,n,v,r,s,p):null},Ni.prototype.evaluate=function(t){var i=this.input.evaluate(t);return(xt(i)===this.inputType&&this.outputs[this.cases[i]]||this.otherwise).evaluate(t)},Ni.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Ni.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},Ni.prototype.serialize=function(){for(var t=this,i=["match",this.input.serialize()],e=[],n={},r=0,s=Object.keys(this.cases).sort();r=5)return i.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var e=i.parse(t[1],1,rt),n=i.parse(t[2],2,Q);if(!e||!n)return null;if(!lt(e.type,[ut(rt),tt,rt]))return i.error("Expected first argument to be of type array or string, but found "+ht(e.type)+" instead");if(4===t.length){var r=i.parse(t[3],3,Q);return r?new Li(e.type,e,n,r):null}return new Li(e.type,e,n)},Li.prototype.evaluate=function(t){var i=this.input.evaluate(t),e=this.beginIndex.evaluate(t);if(!dt(i,["string","array"]))throw new Et("Expected first argument to be of type array or string, but found "+ht(xt(i))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return i.slice(e,n)}return i.slice(e)},Li.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Li.prototype.outputDefined=function(){return!1},Li.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Gi=Ui("==",(function(t,i,e){return i===e}),zi),Bi=Ui("!=",(function(t,i,e){return i!==e}),(function(t,i,e,n){return!zi(0,i,e,n)})),qi=Ui("<",(function(t,i,e){return i",(function(t,i,e){return i>e}),(function(t,i,e,n){return n.compare(i,e)>0})),Zi=Ui("<=",(function(t,i,e){return i<=e}),(function(t,i,e,n){return n.compare(i,e)<=0})),$i=Ui(">=",(function(t,i,e){return i>=e}),(function(t,i,e,n){return n.compare(i,e)>=0})),Wi=function(t,i,e,n,r){this.type=tt,this.number=t,this.locale=i,this.currency=e,this.minFractionDigits=n,this.maxFractionDigits=r};Wi.parse=function(t,i){if(3!==t.length)return i.error("Expected two arguments.");var e=i.parse(t[1],1,Q);if(!e)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return i.error("NumberFormat options argument must be an object.");var r=null;if(n.locale&&!(r=i.parse(n.locale,1,tt)))return null;var s=null;if(n.currency&&!(s=i.parse(n.currency,1,tt)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=i.parse(n["min-fraction-digits"],1,Q)))return null;var a=null;return n["max-fraction-digits"]&&!(a=i.parse(n["max-fraction-digits"],1,Q))?null:new Wi(e,r,s,o,a)},Wi.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Wi.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Wi.prototype.outputDefined=function(){return!1},Wi.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Hi=function(t){this.type=Q,this.input=t};Hi.parse=function(t,i){if(2!==t.length)return i.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var e=i.parse(t[1],1);return e?"array"!==e.type.kind&&"string"!==e.type.kind&&"value"!==e.type.kind?i.error("Expected argument of type string or array, but found "+ht(e.type)+" instead."):new Hi(e):null},Hi.prototype.evaluate=function(t){var i=this.input.evaluate(t);if("string"==typeof i)return i.length;if(Array.isArray(i))return i.length;throw new Et("Expected value to be of type string or array, but found "+ht(xt(i))+" instead.")},Hi.prototype.eachChild=function(t){t(this.input)},Hi.prototype.outputDefined=function(){return!1},Hi.prototype.serialize=function(){var t=["length"];return this.eachChild((function(i){t.push(i.serialize())})),t};var Ki={"==":Gi,"!=":Bi,">":Vi,"<":qi,">=":$i,"<=":Zi,array:_t,at:Ii,boolean:_t,case:Di,coalesce:ji,collator:Nt,format:At,image:Ot,in:Ri,"index-of":Pi,interpolate:Ai,"interpolate-hcl":Ai,"interpolate-lab":Ai,length:Hi,let:Ci,literal:St,match:Ni,number:_t,"number-format":Wi,object:_t,slice:Li,step:oi,string:_t,"to-boolean":Ct,"to-color":Ct,"to-number":Ct,"to-string":Ct,var:ei,within:Jt};function Yi(t,i){var e=i[0],n=i[1],r=i[2],s=i[3];e=e.evaluate(t),n=n.evaluate(t),r=r.evaluate(t);var o=s?s.evaluate(t):1,a=wt(e,n,r,o);if(a)throw new Et(a);return new pt(e/255*o,n/255*o,r/255*o,o)}function Xi(t,i){return t in i}function Ji(t,i){var e=i[t];return void 0===e?null:e}function Qi(t){return{type:t}}function te(t){return{result:"success",value:t}}function ie(t){return{result:"error",value:t}}function ee(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ne(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function re(t){return!!t.expression&&t.expression.interpolated}function se(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function oe(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function ae(t){return t}function ue(t,i){var e,n,r,s="color"===i.type,o=t.stops&&"object"==typeof t.stops[0][0],a=o||void 0!==t.property,u=o||!a,h=t.type||(re(i)?"exponential":"interval");if(s&&((t=K({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],pt.parse(t[1])]}))),t.default?t.default=pt.parse(t.default):t.default=pt.parse(i.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!_i[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===h)e=le;else if("interval"===h)e=ce;else if("categorical"===h){e=fe,n=Object.create(null);for(var f=0,c=t.stops;f=t.stops[n-1][0])return t.stops[n-1][1];var r=si(t.stops.map((function(t){return t[0]})),e);return t.stops[r][1]}function le(t,i,e){var n=void 0!==t.base?t.base:1;if("number"!==se(e))return he(t.default,i.default);var r=t.stops.length;if(1===r)return t.stops[0][1];if(e<=t.stops[0][0])return t.stops[0][1];if(e>=t.stops[r-1][0])return t.stops[r-1][1];var s=si(t.stops.map((function(t){return t[0]})),e),o=function(t,i,e,n){var r=n-e,s=t-e;return 0===r?0:1===i?s/r:(Math.pow(i,s)-1)/(Math.pow(i,r)-1)}(e,n,t.stops[s][0],t.stops[s+1][0]),a=t.stops[s][1],u=t.stops[s+1][1],h=fi[i.type]||ae;if(t.colorSpace&&"rgb"!==t.colorSpace){var f=_i[t.colorSpace];h=function(t,i){return f.reverse(f.interpolate(f.forward(t),f.forward(i),o))}}return"function"==typeof a.evaluate?{evaluate:function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];var e=a.evaluate.apply(void 0,t),n=u.evaluate.apply(void 0,t);if(void 0!==e&&void 0!==n)return h(e,n,o)}}:h(a,u,o)}function de(t,i,e){return"color"===i.type?e=pt.parse(e):"formatted"===i.type?e=gt.fromString(e.toString()):"resolvedImage"===i.type?e=bt.fromString(e.toString()):se(e)===i.type||"enum"===i.type&&i.values[e]||(e=void 0),he(e,t.default,i.default)}Pt.register(Ki,{error:[{kind:"error"},[tt],function(t,i){var e=i[0];throw new Et(e.evaluate(t))}],typeof:[tt,[rt],function(t,i){return ht(xt(i[0].evaluate(t)))}],"to-rgba":[ut(Q,4),[et],function(t,i){return i[0].evaluate(t).toArray()}],rgb:[et,[Q,Q,Q],Yi],rgba:[et,[Q,Q,Q,Q],Yi],has:{type:it,overloads:[[[tt],function(t,i){return Xi(i[0].evaluate(t),t.properties())}],[[tt,nt],function(t,i){var e=i[0],n=i[1];return Xi(e.evaluate(t),n.evaluate(t))}]]},get:{type:rt,overloads:[[[tt],function(t,i){return Ji(i[0].evaluate(t),t.properties())}],[[tt,nt],function(t,i){var e=i[0],n=i[1];return Ji(e.evaluate(t),n.evaluate(t))}]]},"feature-state":[rt,[tt],function(t,i){return Ji(i[0].evaluate(t),t.featureState||{})}],properties:[nt,[],function(t){return t.properties()}],"geometry-type":[tt,[],function(t){return t.geometryType()}],id:[rt,[],function(t){return t.id()}],zoom:[Q,[],function(t){return t.globals.zoom}],"heatmap-density":[Q,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Q,[],function(t){return t.globals.lineProgress||0}],"sky-radial-progress":[Q,[],function(t){return t.globals.skyRadialProgress||0}],accumulated:[rt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Q,Qi(Q),function(t,i){for(var e=0,n=0,r=i;n":[it,[tt,rt],function(t,i){var e=i[0],n=i[1],r=t.properties()[e.value],s=n.value;return typeof r==typeof s&&r>s}],"filter-id->":[it,[rt],function(t,i){var e=i[0],n=t.id(),r=e.value;return typeof n==typeof r&&n>r}],"filter-<=":[it,[tt,rt],function(t,i){var e=i[0],n=i[1],r=t.properties()[e.value],s=n.value;return typeof r==typeof s&&r<=s}],"filter-id-<=":[it,[rt],function(t,i){var e=i[0],n=t.id(),r=e.value;return typeof n==typeof r&&n<=r}],"filter->=":[it,[tt,rt],function(t,i){var e=i[0],n=i[1],r=t.properties()[e.value],s=n.value;return typeof r==typeof s&&r>=s}],"filter-id->=":[it,[rt],function(t,i){var e=i[0],n=t.id(),r=e.value;return typeof n==typeof r&&n>=r}],"filter-has":[it,[rt],function(t,i){return i[0].value in t.properties()}],"filter-has-id":[it,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[it,[ut(tt)],function(t,i){return i[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[it,[ut(rt)],function(t,i){return i[0].value.indexOf(t.id())>=0}],"filter-in-small":[it,[tt,ut(rt)],function(t,i){var e=i[0];return i[1].value.indexOf(t.properties()[e.value])>=0}],"filter-in-large":[it,[tt,ut(rt)],function(t,i){var e=i[0],n=i[1];return function(t,i,e,n){for(;e<=n;){var r=e+n>>1;if(i[r]===t)return!0;i[r]>t?n=r-1:e=r+1}return!1}(t.properties()[e.value],n.value,0,n.value.length-1)}],all:{type:it,overloads:[[[it,it],function(t,i){var e=i[0],n=i[1];return e.evaluate(t)&&n.evaluate(t)}],[Qi(it),function(t,i){for(var e=0,n=i;e0&&"string"==typeof t[0]&&t[0]in Ki}function me(t,i){var e=new ni(Ki,[],i?function(t){var i={color:et,string:tt,number:Q,enum:tt,boolean:it,formatted:ot,resolvedImage:at};if("array"===t.type)return ut(i[t.value]||rt,t.length);return i[t.type]}(i):void 0),n=e.parse(t,void 0,void 0,void 0,i&&"string"===i.type?{typeAnnotation:"coerce"}:void 0);return n?te(new ve(n,i)):ie(e.errors)}ve.prototype.evaluateWithoutErrorHandling=function(t,i,e,n,r,s){return this._evaluator.globals=t,this._evaluator.feature=i,this._evaluator.featureState=e,this._evaluator.canonical=n,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s,this.expression.evaluate(this._evaluator)},ve.prototype.evaluate=function(t,i,e,n,r,s){this._evaluator.globals=t,this._evaluator.feature=i||null,this._evaluator.featureState=e||null,this._evaluator.canonical=n,this._evaluator.availableImages=r||null,this._evaluator.formattedSection=s||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new Et("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var ye=function(t,i){this.kind=t,this._styleExpression=i,this.isStateDependent="constant"!==t&&!ti(i.expression)};ye.prototype.evaluateWithoutErrorHandling=function(t,i,e,n,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,i,e,n,r,s)},ye.prototype.evaluate=function(t,i,e,n,r,s){return this._styleExpression.evaluate(t,i,e,n,r,s)};var ge=function(t,i,e,n){this.kind=t,this.zoomStops=e,this._styleExpression=i,this.isStateDependent="camera"!==t&&!ti(i.expression),this.interpolationType=n};function be(t,i){if("error"===(t=me(t,i)).result)return t;var e=t.value.expression,n=Qt(e);if(!n&&!ee(i))return ie([new Y("","data expressions not supported")]);var r=ii(e,["zoom"]);if(!r&&!ne(i))return ie([new Y("","zoom expressions not supported")]);var s=Me(e);if(!s&&!r)return ie([new Y("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(s instanceof Y)return ie([s]);if(s instanceof Ai&&!re(i))return ie([new Y("",'"interpolate" expressions cannot be used with this property')]);if(!s)return te(new ye(n?"constant":"source",t.value));var o=s instanceof Ai?s.interpolation:void 0;return te(new ge(n?"camera":"composite",t.value,s.labels,o))}ge.prototype.evaluateWithoutErrorHandling=function(t,i,e,n,r,s){return this._styleExpression.evaluateWithoutErrorHandling(t,i,e,n,r,s)},ge.prototype.evaluate=function(t,i,e,n,r,s){return this._styleExpression.evaluate(t,i,e,n,r,s)},ge.prototype.interpolationFactor=function(t,i,e){return this.interpolationType?Ai.interpolationFactor(this.interpolationType,t,i,e):0};var we=function(t,i){this._parameters=t,this._specification=i,K(this,ue(this._parameters,this._specification))};function Me(t){var i=null;if(t instanceof Ci)i=Me(t.result);else if(t instanceof ji)for(var e=0,n=t.args;e3&&i===t[t.length-2]||(n&&2===t.length||t.push(i),t.push(e))}function Oe(t,i){return t.type?t.type:i.expression.interpolated?"exponential":"interval"}function je(t){for(var i=["concat"],e=/{([^{}]+)}/g,n=0,r=e.exec(t);null!==r;r=e.exec(t)){var s=t.slice(n,e.lastIndex-r[0].length);n=e.lastIndex,s.length>0&&i.push(s),i.push(["get",r[1]])}if(1===i.length)return t;if(n=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var i=0,e=t.slice(1);ii?1:0}function Ne(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var i=1;i"===e||"<="===e||">="===e?Le(t[1],t[2],e):"any"===e?(i=t.slice(1),["any"].concat(i.map(De))):"all"===e?["all"].concat(t.slice(1).map(De)):"none"===e?["all"].concat(t.slice(1).map(De).map(Ue)):"in"===e?Fe(t[1],t.slice(2)):"!in"===e?Ue(Fe(t[1],t.slice(2))):"has"===e?ze(t[1]):"!has"===e?Ue(ze(t[1])):"within"!==e||t}function Le(t,i,e){switch(t){case"$type":return["filter-type-"+e,i];case"$id":return["filter-id-"+e,i];default:return["filter-"+e,t,i]}}function Fe(t,i){if(0===i.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",i]];case"$id":return["filter-id-in",["literal",i]];default:return i.length>200&&!i.some((function(t){return typeof t!=typeof i[0]}))?["filter-in-large",t,["literal",i.sort(Pe)]]:["filter-in-small",t,["literal",i]]}}function ze(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Ue(t){return["!",t]}var Ge=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Be(t,i){var e={};for(var n in t)"ref"!==n&&(e[n]=t[n]);return Ge.forEach((function(t){t in i&&(e[t]=i[t])})),e}var qe=function(t,i,e,n){this.message=(t?t+": ":"")+e,n&&(this.identifier=n),null!=i&&i.Jg&&(this.line=i.Jg)},Ve=function(t){this.error=t,this.message=t.message;var i=t.message.match(/line (\d+)/);this.line=i?parseInt(i[1],10):0};function Ze(t){var i=t.key,e=t.value;return e?[new qe(i,e,"constants have been deprecated as of v8")]:[]}function $e(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function We(t){if(Array.isArray(t))return t.map(We);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var i={};for(var e in t)i[e]=We(t[e]);return i}return $e(t)}function He(t){var i=t.key,e=t.value,n=t.valueSpec||{},r=t.objectElementValidators||{},s=t.style,o=t.styleSpec,a=[],u=se(e);if("object"!==u)return[new qe(i,e,"object expected, "+u+" found")];for(var h in e){var f=h.split(".")[0],c=n[f]||n["*"],l=void 0;if(r[f])l=r[f];else if(n[f])l=vn;else if(r["*"])l=r["*"];else{if(!n["*"]){a.push(new qe(i,e[h],'unknown property "'+h+'"'));continue}l=vn}a=a.concat(l({key:(i?i+".":i)+h,value:e[h],valueSpec:c,style:s,styleSpec:o,object:e,objectKey:h},e))}for(var d in n)r[d]||n[d].required&&void 0===n[d].default&&void 0===e[d]&&a.push(new qe(i,e,'missing required property "'+d+'"'));return a}function Ke(t){var i=t.value,e=t.valueSpec,n=t.style,r=t.styleSpec,s=t.key,o=t.arrayElementValidator||vn;if("array"!==se(i))return[new qe(s,i,"array expected, "+se(i)+" found")];if(e.length&&i.length!==e.length)return[new qe(s,i,"array length "+e.length+" expected, length "+i.length+" found")];if(e["min-length"]&&i.lengtha)return[new qe(i,e,e+" is greater than the maximum value "+a)]}return[]}function Xe(t){var i,e,n,r=t.valueSpec,s=$e(t.value.type),o={},a="categorical"!==s&&void 0===t.value.property,u=!a,h="array"===se(t.value.stops)&&"array"===se(t.value.stops[0])&&"object"===se(t.value.stops[0][0]),f=He({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===s)return[new qe(t.key,t.value,'identity function may not have a "stops" property')];var i=[],e=t.value;i=i.concat(Ke({key:t.key,value:e,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),"array"===se(e)&&0===e.length&&i.push(new qe(t.key,e,"array must have at least one stop"));return i},default:function(t){return vn({key:t.key,value:t.value,valueSpec:r,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===s&&a&&f.push(new qe(t.key,t.value,'missing required property "property"')),"identity"===s||t.value.stops||f.push(new qe(t.key,t.value,'missing required property "stops"')),"exponential"===s&&t.valueSpec.expression&&!re(t.valueSpec)&&f.push(new qe(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!ee(t.valueSpec)?f.push(new qe(t.key,t.value,"property functions not supported")):a&&!ne(t.valueSpec)&&f.push(new qe(t.key,t.value,"zoom functions not supported"))),"categorical"!==s&&!h||void 0!==t.value.property||f.push(new qe(t.key,t.value,'"property" property is required')),f;function c(t){var i=[],s=t.value,a=t.key;if("array"!==se(s))return[new qe(a,s,"array expected, "+se(s)+" found")];if(2!==s.length)return[new qe(a,s,"array length 2 expected, length "+s.length+" found")];if(h){if("object"!==se(s[0]))return[new qe(a,s,"object expected, "+se(s[0])+" found")];if(void 0===s[0].zoom)return[new qe(a,s,"object stop key must have zoom")];if(void 0===s[0].value)return[new qe(a,s,"object stop key must have value")];if(n&&n>$e(s[0].zoom))return[new qe(a,s[0].zoom,"stop zoom values must appear in ascending order")];$e(s[0].zoom)!==n&&(n=$e(s[0].zoom),e=void 0,o={}),i=i.concat(He({key:a+"[0]",value:s[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Ye,value:l}}))}else i=i.concat(l({key:a+"[0]",value:s[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},s));return pe(We(s[1]))?i.concat([new qe(a+"[1]",s[1],"expressions are not allowed in function stops.")]):i.concat(vn({key:a+"[1]",value:s[1],valueSpec:r,style:t.style,styleSpec:t.styleSpec}))}function l(t,n){var a=se(t.value),u=$e(t.value),h=null!==t.value?t.value:n;if(i){if(a!==i)return[new qe(t.key,h,a+" stop domain type must match previous stop domain type "+i)]}else i=a;if("number"!==a&&"string"!==a&&"boolean"!==a)return[new qe(t.key,h,"stop domain value must be a number, string, or boolean")];if("number"!==a&&"categorical"!==s){var f="number expected, "+a+" found";return ee(r)&&void 0===s&&(f+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new qe(t.key,h,f)]}return"categorical"!==s||"number"!==a||isFinite(u)&&Math.floor(u)===u?"categorical"!==s&&"number"===a&&void 0!==e&&u":case">=":i.length>=2&&"$type"===$e(i[1])&&s.push(new qe(e,i,'"$type" cannot be use with operator "'+i[0]+'"'));case"==":case"!=":3!==i.length&&s.push(new qe(e,i,'filter array for operator "'+i[0]+'" must have 3 elements'));case"in":case"!in":i.length>=2&&"string"!==(n=se(i[1]))&&s.push(new qe(e+"[1]",i[1],"string expected, "+n+" found"));for(var o=2;oh&&E.push("'"+this.tb[x]+"'");_=l.showPosition?"Parse error on line "+(a+1)+":\n"+l.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.tb[g]||g)+"'":"Parse error on line "+(a+1)+": Unexpected "+(g==f?"end of input":"'"+(this.tb[g]||g)+"'"),this.parseError(_,{text:l.match,token:this.tb[g]||g,line:l.yylineno,loc:p,expected:E})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(w[0]){case 1:e.push(g),n.push(l.yytext),r.push(l.yylloc),e.push(w[1]),g=null,u=l.yyleng,o=l.yytext,a=l.yylineno,p=l.yylloc;break;case 2:if(k=this.ib[w[1]][1],T.$=n[n.length-k],T._$={first_line:r[r.length-(k||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(k||1)].first_column,last_column:r[r.length-1].last_column},m&&(T._$.range=[r[r.length-(k||1)].range[0],r[r.length-1].range[1]]),void 0!==(M=this.performAction.apply(T,[o,u,a,d.yy,w[1],n,r].concat(c))))return M;k&&(e=e.slice(0,-1*k*2),n=n.slice(0,-1*k),r=r.slice(0,-1*k)),e.push(this.ib[w[1]][0]),n.push(T.$),r.push(T._$),S=s[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===n.length?this.yylloc.first_column:0)+n[n.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var e,n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,e,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;si[0].length)){if(i=e,n=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,r[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,i,e,n){switch(e){case 0:break;case 1:return 6;case 2:return i.yytext=i.yytext.substr(1,i.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function d(){this.yy={}}return c.lexer=l,d.prototype=c,c.Parser=d,new d}();i.parser=e,i.Parser=e.Parser,i.parse=function(){return e.parse.apply(e,arguments)}}));function wn(t){if(t instanceof String||"string"==typeof t||t instanceof Buffer)try{return bn.parse(t.toString())}catch(t){throw new Ve(t)}return t}function Mn(t,i){void 0===i&&(i=x);var e=t;try{e=wn(e)}catch(t){return[t]}return mn(e,i)}new Set(["vector","raster","raster-dem"]);var xn=pe,kn=be,Sn=ke,En=oe;Mn.parsed=Mn,Mn.latest=Mn;var Tn,_n,An=e(63724),On=En,jn=Sn,Cn=xn,In=kn,Rn={Point:1,MultiPoint:1,LineString:2,MultiLineString:2,Polygon:3,MultiPolygon:3},Pn={center:[.5,.5],left:[0,.5],right:[1,.5],top:[.5,0],bottom:[.5,1],"top-left":[0,0],"top-right":[1,0],"bottom-left":[0,1],"bottom-right":[1,1]},Nn={},Dn={zoom:0},Ln={};function Fn(t,i,e,n,r){var s=t.id;Ln[s]||(Ln[s]={});var o=Ln[s];if(!o[e]){var a=(t[i]||Nn)[e],u=x[i+"_"+t.type][e];void 0===a&&(a=u.default);var h=Cn(a);if(!h&&On(a)&&(a=jn(a,u),h=!0),h){var f=function(t,i){var e=In(t,i);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return e.value}(a,u);o[e]=f.evaluate.bind(f)}else"color"==u.type&&(a=pt.parse(a)),o[e]=function(){return a}}return Dn.zoom=n,o[e](Dn,r)}var zn={};function Un(t,i){if(t){if(0===t.a||0===i)return;var e=t.a;return i=void 0===i?1:i,"rgba("+Math.round(255*t.r/e)+","+Math.round(255*t.g/e)+","+Math.round(255*t.b/e)+","+e*i+")"}return t}var Gn=/^([^]*)\{(.*)\}([^]*)$/;function Bn(t,i){var e;do{if(e=t.match(Gn)){var n=i[e[2]]||"";t=e[1]+n+e[3]}}while(e);return t}var qn=!1;function Vn(t,i,e,n,r,s,o){if(void 0===n&&(n=An.H2),"string"==typeof i&&(i=JSON.parse(i)),8!=i.version)throw new Error("glStyle version 8 required.");var a,u;if(s)if("undefined"!=typeof Image){var h=new Image;h.crossOrigin="anonymous",h.onload=function(){a=h,u=[h.width,h.height],t.changed(),h.onload=null},h.src=s}else if("undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope){var f=self;f.postMessage({action:"loadImage",src:s}),f.addEventListener("message",(function(t){"imageLoaded"===t.data.action&&t.data.src===s&&(a=t.data.image,u=[a.width,a.height])}))}for(var c,l=function(t){t=t.slice();for(var i=Object.create(null),e=0;e=S.maxzoom)return"continue";var A=S.filter;if(!A||function(t,i,e,n){return t in zn||(zn[t]=Re(i).filter),Dn.zoom=n,zn[t](Dn,e)}(E,A,l,h)){f=S;var O=void 0,j=void 0,D=void 0,L=void 0,F=void 0,z=void 0,U=k.index;if(3==c&&("fill"==S.type||"fill-extrusion"==S.type))if(j=Fn(S,"paint",S.type+"-opacity",h,l),S.type+"-pattern"in _){var G=Fn(S,"paint",S.type+"-pattern",h,l);if(G){var B="string"==typeof G?Bn(G,e):G.toString();if(a&&r&&r[B]){++x,(z=N[x])&&z.getFill()&&!z.getStroke()&&!z.getText()||(z=new b.ZP({fill:new p.Z}),N[x]=z),D=z.getFill(),z.setZIndex(U);var q=P[gt=B+"."+j];if(!q){var V=r[B];(wt=(bt=(0,An.vL)(V.width,V.height)).getContext("2d")).globalAlpha=j,wt.drawImage(a,V.x,V.y,V.width,V.height,0,0,V.width,V.height),q=wt.createPattern(bt,"repeat"),P[gt]=q}D.setColor(q)}}}else(O=Un(Fn(S,"paint",S.type+"-color",h,l),j))&&(S.type+"-outline-color"in _&&(F=Un(Fn(S,"paint",S.type+"-outline-color",h,l),j)),F||(F=O),++x,(z=N[x])&&z.getFill()&&z.getStroke()&&!z.getText()||(z=new b.ZP({fill:new p.Z,stroke:new g.Z}),N[x]=z),(D=z.getFill()).setColor(O),(L=z.getStroke()).setColor(F),L.setWidth(1),z.setZIndex(U));if(1!=c&&"line"==S.type){O=!("line-pattern"in _)&&"line-color"in _?Un(Fn(S,"paint","line-color",h,l),Fn(S,"paint","line-opacity",h,l)):void 0;var Z=Fn(S,"paint","line-width",h,l);O&&Z>0&&(++x,(z=N[x])&&z.getStroke()&&!z.getFill()&&!z.getText()||(z=new b.ZP({stroke:new g.Z}),N[x]=z),(L=z.getStroke()).setLineCap(Fn(S,"layout","line-cap",h,l)),L.setLineJoin(Fn(S,"layout","line-join",h,l)),L.setMiterLimit(Fn(S,"layout","line-miter-limit",h,l)),L.setColor(O),L.setWidth(Z),L.setLineDash(_["line-dasharray"]?Fn(S,"paint","line-dasharray",h,l).map((function(t){return t*Z})):null),z.setZIndex(U))}var $=!1,W=null,H=0,K=void 0,Y=void 0,X=void 0;if((1==c||2==c)&&"icon-image"in T){var J=Fn(S,"layout","icon-image",h,l);if(J){K="string"==typeof J?Bn(J,e):J.toString();var Q=void 0;if(a&&r&&r[K]){var tt=Fn(S,"layout","icon-rotation-alignment",h,l);if(2==c){var it=t.getGeometry();if(it.getFlatMidpoint||it.getFlatMidpoints){var et=it.getExtent();if(Math.sqrt(Math.max(Math.pow((et[2]-et[0])/i,2),Math.pow((et[3]-et[1])/i,2)))>150){var nt="MultiLineString"===it.getType()?it.getFlatMidpoints():it.getFlatMidpoint();if(_n||(Tn=[NaN,NaN],_n=new y.Z("Point",Tn,[],{},null)),Q=_n,Tn[0]=nt[0],Tn[1]=nt[1],"line"===(Ut=Fn(S,"layout","symbol-placement",h,l))&&"map"===tt)for(var rt=it.getStride(),st=it.getFlatCoordinates(),ot=0,at=st.length-rt;ot=lt&&nt[0]<=vt&&nt[1]>=dt&&nt[1]<=pt){H=Math.atan2(ht-ct,ft-ut);break}}}}}if(2!==c||Q){var mt=Fn(S,"layout","icon-size",h,l),yt=void 0!==_["icon-color"]?Fn(S,"paint","icon-color",h,l):null;if(!yt||0!==yt.a){var gt=K+"."+mt;if(null!==yt&&(gt+="."+yt),!(Y=R[gt])){V=r[K];if(null!==yt){var bt,wt;(wt=(bt=(0,An.vL)(V.width,V.height)).getContext("2d")).drawImage(a,V.x,V.y,V.width,V.height,0,0,V.width,V.height);for(var Mt=wt.getImageData(0,0,bt.width,bt.height),xt=0,kt=Mt.data.length;xt0?new g.Z({width:At,color:Tt}):void 0,fill:_t?new p.Z({color:_t}):void 0}),R[Ot]=Y),z.setImage(Y),W=z.getText(),z.setText(void 0),z.setGeometry(void 0),z.setZIndex(U),$=!0}var jt=void 0;if("text-field"in T)jt=Bn(Fn(S,"layout","text-field",h,l).toString(),e).trim(),j=Fn(S,"paint","text-opacity",h,l);if(jt&&j&&!X){$||(++x,(z=N[x])&&z.getText()&&!z.getFill()&&!z.getStroke()||(z=new b.ZP,N[x]=z),z.setImage(void 0),z.setGeometry(void 0)),z.getText()||z.setText(W||new w.Z({padding:[2,2,2,2]})),W=z.getText();var Ct=Math.round(Fn(S,"layout","text-size",h,l)),It=Fn(S,"layout","text-font",h,l),Rt=Fn(S,"layout","text-line-height",h,l),Pt=M(o?o(It):It,Ct,Rt),Nt=T["text-transform"];"uppercase"==Nt?jt=jt.toUpperCase():"lowercase"==Nt&&(jt=jt.toLowerCase());var Dt=Fn(S,"layout","text-max-width",h,l),Lt=Fn(S,"layout","text-letter-spacing",h,l),Ft=2==c?(0,An.tM)(jt,Lt):(0,An.lD)(jt,Pt,Dt,Lt);W.setText(Ft),W.setFont(Pt),W.setRotation((0,An.Vl)(Fn(S,"layout","text-rotate",h,l)));var zt=Fn(S,"layout","text-anchor",h,l),Ut=$||1==c?"point":Fn(S,"layout","symbol-placement",h,l);W.setPlacement(Ut);var Gt=Fn(S,"paint","text-halo-width",h,l),Bt=Fn(S,"layout","text-offset",h,l),qt=Fn(S,"paint","text-translate",h,l),Vt=0,Zt=0;if("point"==Ut){var $t="center";-1!==zt.indexOf("left")?($t="left",Zt=Gt):-1!==zt.indexOf("right")&&($t="right",Zt=-Gt),W.setTextAlign($t);var Wt=Fn(S,"layout","text-rotation-alignment",h,l);W.setRotateWithView("map"==Wt)}else W.setMaxAngle((0,An.Vl)(Fn(S,"layout","text-max-angle",h,l))*jt.length/Ft.length),W.setTextAlign(),W.setRotateWithView(!1);var Ht="middle";0==zt.indexOf("bottom")?(Ht="bottom",Vt=-Gt-.5*(Rt-1)*Ct):0==zt.indexOf("top")&&(Ht="top",Vt=Gt+.5*(Rt-1)*Ct),W.setTextBaseline(Ht),W.setOffsetX(Bt[0]*Ct+Zt+qt[0]),W.setOffsetY(Bt[1]*Ct+Vt+qt[1]),I.setColor(Un(Fn(S,"paint","text-color",h,l),j)),W.setFill(I);var Kt=Un(Fn(S,"paint","text-halo-color",h,l),j);if(Kt){C.setColor(Kt),Gt*=2;var Yt=.5*Ct;C.setWidth(Gt<=Yt?Gt:Yt),W.setStroke(C)}else W.setStroke(void 0);var Xt=Fn(S,"layout","text-padding",h,l),Jt=W.getPadding();Xt!==Jt[0]&&(Jt[0]=Xt,Jt[1]=Xt,Jt[2]=Xt,Jt[3]=Xt),z.setZIndex(U)}}},S=0,E=s.length;S-1?(N.length=x+1,qn&&("function"==typeof t.set?t.set("mapbox-layer",f):t.getProperties()["mapbox-layer"]=f),N):void 0}};return t.setStyle(D),t.set("mapbox-source",c),t.set("mapbox-layers",x),D}var Zn,$n=e(50225),Wn=e(61430),Hn=e(62896),Kn=e(57899),Yn={},Xn=/font-family: ?([^;]*);/,Jn=/("|')/g;function Qn(t){if(!Zn){Zn={};for(var i=document.styleSheets,e=0,n=i.length;e2?n[2]:""):t+e}function or(t,i,e,n,r){return new Promise((function(s,o){if("object"!=typeof i&&(i=JSON.parse(i)),8!=i.version)return o(new Error("glStyle version 8 required."));if(!(t instanceof h.Z||t instanceof c.Z))return o(new Error("Can only apply to VectorLayer or VectorTileLayer"));var a,u,f;function l(){f||i.sprite&&!a?f?(t.setStyle(f),s()):o(new Error("Something went wrong trying to apply style.")):(f=Vn(t,i,e,r,a,u,er),t.getStyle()?s():o(new Error("Nothing to show for source ["+e+"]")))}if(i.sprite){var d=.5==(window.devicePixelRatio>=1.5?.5:1)?"@2x":"",v=sr(i.sprite,n,d+".json");fetch(v,{credentials:"same-origin"}).then((function(t){return t.ok||""===d?t:(v=sr(i.sprite,n,".json"),fetch(v,{credentials:"same-origin"}))})).then((function(t){if(t.ok)return t.json();o(new Error("Problem fetching sprite from "+v+": "+t.statusText))})).then((function(t){if(void 0===t)return o(new Error("No sprites found."));a=t,u=sr(i.sprite,n,d+".png"),l()})).catch((function(t){o(new Error("Sprites cannot be loaded: "+v+": "+t.message))}))}else l()}))}var ar={};function ur(t,i){var e={type:i.type};function n(){var n=t.getTargetElement();if(n){var r=i.layout||{},s=i.paint||{};e.paint=s,e.id="olms-bg-"+s["background-opacity"]+s["background-color"];var o=t.getView().getZoom();if(void 0!==s["background-color"]){var a=Fn(e,"paint","background-color",o,ar);n.style.background=pt.parse(a).toString()}void 0!==s["background-opacity"]&&(n.style.opacity=Fn(e,"paint","background-opacity",o,ar)),"none"==r.visibility&&(n.style.backgroundColor="",n.style.opacity="")}}t.getTargetElement()&&n(),t.on(["change:resolution","change:target"],n)}function hr(t){var i=t.bounds;if(i){var e=(0,Hn.mi)([i[0],i[1]]),n=(0,Hn.mi)([i[2],i[3]]);return[e[0],e[1],n[0],n[1]]}}var fr=new n.Z;function cr(t,i,e){var n=Fn(t,"paint","raster-opacity",e.getZoom(),ar);i.setOpacity(n)}function lr(t,i,e,n,s,v){void 0===v&&(v="");var p=[],m=i.getView();m.isDef()||m.getRotation()||m.getResolutions()||(m=new d.ZP({maxResolution:An.H2[0]}),i.setView(m)),"center"in t&&!m.getCenter()&&m.setCenter((0,Hn.mi)(t.center)),"zoom"in t&&void 0===m.getZoom()&&m.setResolution(An.H2[0]/Math.pow(2,t.zoom)),m.getCenter()&&void 0!==m.getZoom()||m.fit(m.getProjection().getExtent(),{nearest:!0,size:i.getSize()}),t.sprite&&(0==t.sprite.indexOf("mapbox://")?t.sprite=e+"/sprite"+v:0!=t.sprite.indexOf("http")&&(t.sprite=(n?n+s:"")+t.sprite+v));for(var y,g,b,w,M,x,k=t.layers,S=[],E=function(e,d){var E,_,A,O=(y=k[e]).type;if("heatmap"==O||"hillshade"==O);else if("background"==O)ur(i,y);else{if((w=y.source||(E=k,_=y.ref,E.some((function(t){if(t.id==_)return A=t.source,!0})),A))!=b){if(S.length&&(p.push(vr(M,S,t,s,i)),S=[]),g=t.sources[w],x=g.url)if(0==(x=rr(x,s)).indexOf("mapbox://")){var j=x.replace("mapbox://","");g.tiles=["a","b","c","d"].map((function(t){return"https://"+t+".tiles.mapbox.com/v4/"+j+"/{z}/{x}/{y}."+("vector"==g.type?"vector.pbf":"png")+v}))}else 0===x.indexOf("/")&&0===n.indexOf("http")&&(x=n+x);g.tiles&&(g.tiles=g.tiles.map((function(t){return rr(t,s)}))),"vector"==g.type?M=function(t,i,e){t=(0,An.f0)({},t);var n=new c.Z({declutter:!0,visible:!1}),s=JSON.stringify(t),u=Yn[s];u||(u=new a.Z({url:t.tiles?void 0:e,tileJSON:t.tiles?t:void 0}),Yn[s]=u);var h=u.on("change",(function(){var t=u.getState();if("ready"===t){var i=u.getTileJSON(),s=Array.isArray(i.tiles)?i.tiles:[i.tiles];if(e)for(var a=0,f=s.length;a2?u[2]:""),e=new Promise((function(e,s){fetch(i,{credentials:"same-origin"}).then((function(t){return t.json()})).then((function(u){var h=document.createElement("A");h.href=i;var f=h.href;a=h.pathname.split("/").slice(0,-1).join("/")+"/",o=f.substr(0,f.indexOf(a)),lr(u,t,r,o,a,n).then((function(){e(t)})).catch(s)})).catch((function(t){s(new Error("Could not load "+i+": "+t.message))}))}))}else e=new Promise((function(e,n){lr(i,t).then((function(){e(t)})).catch(n)}));return e}function vr(t,i,e,n,r){for(var s=24,o=0,a=e.layers,u=0,h=a.length;u0||c>0)&&t.setMaxResolution(Math.min(An.H2[s],h.getResolution(c))+1e-9),o<24&&t.setMinResolution(An.H2[o]+1e-9)}}r instanceof f.Z||r instanceof l.Z?or(t,e,i,n).then((function(){t.setVisible(!0),a()}),(function(t){u(t)})):a()}else u(new Error("Error accessing data for source "+t.get("mapbox-source")))};t.set("mapbox-layers",i),-1===r.getLayers().getArray().indexOf(t)&&r.addLayer(t),t.getSource()?h():t.once("change:source",h)}))}},63724:function(t,i,e){"use strict";e.d(i,{f0:function(){return o},Vl:function(){return a},H2:function(){return u},vL:function(){return h},h5:function(){return f},tM:function(){return d},lD:function(){return y}});var n=e(79021),r=e(80745),s=e(19079),o="function"==typeof Object.assign?Object.assign:function(t,i){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1,r=arguments.length;n=.05){for(var e="",n=t.split("\n"),r=l.slice(0,Math.round(i/.1)),s=0,o=n.length;s0&&(e+="\n"),e+=n[s].split("").join(r);return e}return t}function v(){return c||(c=h(1,1).getContext("2d")),c}function p(t,i){return v().measureText(t).width+(t.length-1)*i}var m={};function y(t,i,e,n){if(-1!==t.indexOf("\n")){for(var r=t.split("\n"),s=[],o=0,a=r.length;o1){var c=v();c.font=i;var l=c.measureText("M").width*e,g="";for(s=[],o=0,a=f.length;o1;++o){var M=s[o];if(p(M,n)<.35*l){var x=o>0?p(s[o-1],n):1/0,k=o.7*l&&p(E,n)<.6*l){var T=S.split(" "),_=T.pop();p(_,n)<.2*l&&(s[o]=T.join(" "),s[o+1]=_+" "+E),a-=1}}h=s.join("\n")}else h=t;h=d(h,n),m[u]=h}return h}r.GK&&(0,s.oL)(r.GK,n.Z.CLEAR,(function(){m={}}))}},e={};function n(t){var r=e[t];if(void 0!==r)return r.exports;var s=e[t]={id:t,loaded:!1,exports:{}};return i[t].call(s.exports,s,s.exports,n),s.loaded=!0,s.exports}n.m=i,t=[],n.O=function(i,e,r,s){if(!e){var o=1/0;for(f=0;f=s)&&Object.keys(n.O).every((function(t){return n.O[t](e[u])}))?e.splice(u--,1):(a=!1,s0&&t[f-1][2]>s;f--)t[f]=t[f-1];t[f]=[e,r,s]},n.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(i,{a:i}),i},n.d=function(t,i){for(var e in i)n.o(i,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},function(){var t;n.g.importScripts&&(t=n.g.location+"");var i=n.g.document;if(!t&&i&&(i.currentScript&&(t=i.currentScript.src),!t)){var e=i.getElementsByTagName("script");e.length&&(t=e[e.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t}(),function(){var t={8592:0};n.O.j=function(i){return 0===t[i]};var i=function(i,e){var r,s,o=e[0],a=e[1],u=e[2],h=0;if(o.some((function(i){return 0!==t[i]}))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(u)var f=u(n)}for(i&&i(e);h